+ 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)
10 Respostas
+ 43
@Supersebi3 I know, this is a joke!
Haha...
Do not look at the code. Look at the result!
+ 38
@Illusive Man. My code also guesses the number
đđđđđ My code is cooler than yoursđđđđ
https://code.sololearn.com/ccQsVBEcjEfF/?ref=app
+ 29
Part 2
https://code.sololearn.com/c3fbb43szK67/?ref=app
pure random (almost human logicđ
).
takes numbers up to 1000000
+ 28
first part:
https://code.sololearn.com/cahTDgSofKLl/?ref=app
10 min and part 2 ready...
+ 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
+ 8
@Igor thats cheating, your code just prints the number I entered, not finds it using some algorithm
+ 6
When you did it, post the code on SL, link it here, also tell me if future challenges should be easier or harder
+ 5
Ace did it already: guess it's really trending... https://code.sololearn.com/cUx55EsTKnaz/?ref=app
+ 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
+ 2
@Supersebi3
Ye, it's been two years, but here you go:
https://code.sololearn.com/cwUgy3pDiaiH