Can anyone help me how do i do this question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone help me how do i do this question

Do a code that is used to creat a program that asks the user to input any number then check if the number is more than 100 it will print you win otherwise will print try later

2nd Dec 2018, 2:49 PM
zaina
2 Answers
+ 18
โ— take user input as an Integer //let it be n โ— make use of if() & else statements // if(n>100) print "you win" else print "try later" //this is very basic way to do it in any language๐Ÿ‘
2nd Dec 2018, 2:59 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
num = input(Enter a number: ) If num>100: print("You win!") else: print("Try later")
2nd Dec 2018, 3:06 PM
Loop
Loop - avatar