0

What is the error in this code

x=int(input('enter values :')) if x<=10 : print ('''condition true''') else : print ('''invalid''')

18th Jul 2020, 5:54 AM
Ajay
Ajay - avatar
2 odpowiedzi
0
How can I command the user to enter value as choice
18th Jul 2020, 6:06 AM
Ajay
Ajay - avatar
0
Ajay If by values you mean numbers, you can't command anybody to enter anything😃😃 The best thing you can do is use a try and except block.
18th Jul 2020, 6:09 AM
Tomiwa Joseph
Tomiwa Joseph - avatar