Almost daily coding challenge #4 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Almost daily coding challenge #4

This time it's all about guessing. Either: 1. Create a program that generates a random number between 0 and 100 and have the user repeatedly input a number. If it is higher or lower than the random number, notify the user of it. If the user guesses the right number he wins. or 2. The other way around: let the user enter a number between 0-1000 and create an algorithm searching for that number, with the same hints as the user gets in the first task. (this is more fun imo)

21st Apr 2017, 3:40 PM
Supersebi3
Supersebi3 - avatar
10 Answers
+ 43
@Supersebi3 I know, this is a joke! Haha... Do not look at the code. Look at the result!
22nd Apr 2017, 10:39 AM
Igor
Igor - avatar
+ 38
@Illusive Man. My code also guesses the number 😎😜😜😋😆 My code is cooler than yours😆😆😆😆 https://code.sololearn.com/ccQsVBEcjEfF/?ref=app
22nd Apr 2017, 10:30 AM
Igor
Igor - avatar
+ 29
Part 2 https://code.sololearn.com/c3fbb43szK67/?ref=app pure random (almost human logic😅). takes numbers up to 1000000
21st Apr 2017, 7:16 PM
Illusive Man
Illusive Man - avatar
+ 28
first part: https://code.sololearn.com/cahTDgSofKLl/?ref=app 10 min and part 2 ready...
21st Apr 2017, 6:23 PM
Illusive Man
Illusive Man - avatar
+ 8
@seamiki many people did it already, but I want you to use your own algorithm (optional) and own code! its time to reinvent the wheel! ...or something like that
21st Apr 2017, 5:06 PM
Supersebi3
Supersebi3 - avatar
+ 8
@Igor thats cheating, your code just prints the number I entered, not finds it using some algorithm
22nd Apr 2017, 10:33 AM
Supersebi3
Supersebi3 - avatar
+ 6
When you did it, post the code on SL, link it here, also tell me if future challenges should be easier or harder
21st Apr 2017, 3:40 PM
Supersebi3
Supersebi3 - avatar
+ 5
Ace did it already: guess it's really trending... https://code.sololearn.com/cUx55EsTKnaz/?ref=app
21st Apr 2017, 4:59 PM
seamiki
seamiki - avatar
+ 3
Here is mine. Enter a number smaller than the size variable (change size if you'd like) and it will guess it https://code.sololearn.com/cFh2E754uqy4/?ref=app
21st Apr 2017, 5:48 PM
LordHill
LordHill - avatar
+ 2
@Supersebi3 Ye, it's been two years, but here you go: https://code.sololearn.com/cwUgy3pDiaiH
19th Feb 2019, 1:03 AM
Freezemage
Freezemage - avatar