Challenge Time #3 🏁⚠🖐 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Challenge Time #3 🏁⚠🖐

Can you code this challenge? Title: Guess the Number Difficulty: Intermediate Your program asks the user to guess and number and keep it in their head. It then asks the user to input a range that would dictates the maximum and minimun range your program should guess the number from. If your program guesses too high or too low, the user should be able to input "too high" or "too low" to notify you to fix your guess.

4th Sep 2017, 10:29 PM
Carlos Castro
Carlos Castro - avatar
14 Answers
+ 7
Here is some code you can drop in a Visual Studio console application and run: https://gist.github.com/dsoverby1986/18d3bd57694205438f931f7f761937e6 This solution won't work in SoloLearn's fake console, as their "console" is merely an output panel.
5th Sep 2017, 2:48 PM
Shane Overby
Shane Overby - avatar
+ 6
@raghav, if you are asking about how to create a console app in Visual Studio, just go File > New > Project... then select from the left side panel... Installed > Templates > Visual C# > Windows Classic Desktop then select Console App (.NET Framework) from the center panel then name the project below and click OK then the project will be created and you should see the Program.cs file opened.
5th Sep 2017, 8:05 PM
Shane Overby
Shane Overby - avatar
+ 5
@raghav Are you asking about how to make a new console application in Visual Studio?
5th Sep 2017, 5:19 PM
Shane Overby
Shane Overby - avatar
+ 3
Hi, DePrell. I'd be happy to try to answer any questions you may have. I work part-time as a mentor for junior devs and really enjoy working with people on learning about the many aspects of the industry. I will update this post with information on how best to contact me.
14th Sep 2017, 2:51 AM
Shane Overby
Shane Overby - avatar
+ 3
@DePrell Rouse I'm looking forward to it
24th Sep 2017, 9:35 PM
Shane Overby
Shane Overby - avatar
+ 2
Sorry i don't know how to linked my code so I will only explain my thought here.It's a classic binary search,the code need to build an arraylist with min & max at first, everytime we return the array[mid], if user input "too low",then left = mid + 1,do binary search between [new left,right];if user input "too high", do binary search between [left, new right= mid - 1];the time complexity will be O(logn).
4th Sep 2017, 11:35 PM
Ran
Ran - avatar
+ 2
DePrell, I have joined an unofficial SoloLearn Slack team. You can join the Slack team here: https://slack-invite-automate.herokuapp.com If you're not familiar with Slack, you can download their app on mobile and/or desktop, or use their web app in a browser. Then just specify the team url (mainfunction slack.com), then sign up or login. You can then search for me (Shane Overby) and send me a direct message. I have Slack on mobile and desktop and am pretty much always available there. Alternatively, you can email me, if you'd like, at dsoverby1986@gmail.com. I will respond to your emails as soon as possible, but it likely won't be as fast as on Slack. Either way is fine with me, but if you contact me via email, be sure to include a subject that will stand out. Anyone reading this thread is welcome to contact me anytime using either of these methods.
15th Sep 2017, 1:14 PM
Shane Overby
Shane Overby - avatar
+ 2
The last 10 days or so have been absolutely crazy for me, but things have settled down...I'm following your recommendations as I post this and getting into some python and Java. Looking forward to picking your brain a bit and introducing myself to Slack.😃😃😃
24th Sep 2017, 9:23 PM
DePrell Rouse
DePrell Rouse - avatar
+ 2
@DePrell Rouse. I will keep looking for you in the direct messages user list and if I find you before you've gotten in touch with me I will message you.
25th Sep 2017, 1:25 AM
Shane Overby
Shane Overby - avatar
+ 2
@DePrell Rouse I see what you're saying now about not being able to find me. I'd already join a different unofficial SoloLearn Slack team called MainFunction. Perhaps, try joining that team and then try to locate me for direct messaging.
25th Sep 2017, 1:36 AM
Shane Overby
Shane Overby - avatar
+ 1
how to make a app
5th Sep 2017, 4:21 PM
raghav
+ 1
Shane, I have a fully loaded laptop (designed for developer) visual studios is difficult to navigate for beginning students. May I direct my questions to you occasionally???
14th Sep 2017, 2:05 AM
DePrell Rouse
DePrell Rouse - avatar
+ 1
okay Shane...thanx a million.
14th Sep 2017, 2:38 PM
DePrell Rouse
DePrell Rouse - avatar
+ 1
okay...I set up SLACK. It won't let me find you, however I sent an email from the app after I sync'd it with my drive account etc...
24th Sep 2017, 10:14 PM
DePrell Rouse
DePrell Rouse - avatar