0

a=input('Enter no. = ') if a > 10 print('Ok') if a <= 10 print('Not ok')

What is the error ?

24th Jun 2022, 4:12 AM
Anushka Jangra
Anushka Jangra - avatar
2 odpowiedzi
+ 4
Anushka Jangra , both of your if ... conditionals need to have a colon ":" at the end of the line
24th Jun 2022, 10:47 AM
Lothar
Lothar - avatar
+ 2
Because you need parsed "a" to integer a = int(input('Enter no. = '))
24th Jun 2022, 4:24 AM
Joshua CG
Joshua CG - avatar