+ 1

What's wrong with this py code? Please help me!

So I want to get the input value and then if it's greater then print cannot go higher but if it's less than 10 then print perfect, so how can I do that? https://sololearn.com/compiler-playground/cV05ZcB6EbdF/?ref=app

21st Feb 2024, 5:33 PM
Akanksha Raundal
Akanksha Raundal - avatar
6 Answers
22nd Feb 2024, 11:58 PM
Hiking Hiker
+ 5
it is num >= 10 instead of num = >10 and the indentation is wrong. Indentation is crucial in Python
21st Feb 2024, 5:37 PM
Lisa
Lisa - avatar
+ 1
Thanks a lot !
21st Feb 2024, 5:38 PM
Akanksha Raundal
Akanksha Raundal - avatar
+ 1
Thanks bro!
23rd Feb 2024, 7:18 PM
Akanksha Raundal
Akanksha Raundal - avatar
0
Yaser Bakhshi I think wrong code, bro 😂
23rd Feb 2024, 7:28 AM
Hiking Hiker
0
num = int(input()) if num > 10: print("cannot go higher!") else: print("Perfect!")
23rd Feb 2024, 10:30 AM
Doshirak
Doshirak - avatar