0
Python
The user has to guess a number between 1-100, if he/she is close to the answer but not correct the programme will tell him that the answer is wrong but he is close. All the other answers will result in the wrong answer, for example numbers over 100 or under 0 or numbers not close to the answer. The random number is this case is 60 which the user should guess. https://code.sololearn.com/ctbLtK3p3Lzd/?ref=app
3 Answers
0
1.indent, 4 spaces
2.colon after if elif else
3.elif 100 < x < 0: # 100<x<0 always return False, the block inside will not be executed.
4.only input once on the Code Plyaground
suggest you learn the basic syntax before coding.
https://www.sololearn.com/learning/1169
https://www.python.org/dev/peps/pep-0008/
0
How else do u suggest i write the code to tell the user he/she cant guess lower than 0 or higher than 100?
0
Do u mean i should delete the last input command?