how to write a code of matching a random number from a user input number using if-else statements. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to write a code of matching a random number from a user input number using if-else statements.

simple basic code is needed.

22nd Feb 2020, 6:29 AM
H K Nagar
H K Nagar - avatar
2 Answers
+ 1
You mean something like a "Guess the number" game? If so, then try to find examples in Code Playground, many had written such codes 👍
22nd Feb 2020, 6:34 AM
Ipang
0
Basic Pseudo code would be like Random = some random number Input = user_input If Random == Input : Guess is correct else: Guess is wrong You can make a code based on this pseudo code and change it however you like... You can also search other similar codes for reference.
22nd Feb 2020, 6:39 AM
Utkarsh Sharma
Utkarsh Sharma - avatar