28th Jul 2020, 5:15 PM
Yukthamukhi Rudra
Yukthamukhi Rudra - avatar
6 odpowiedzi
+ 5
Identation itself is a special character in python. If you'll omit it will be result in errors. So, every function that ends with ':', the next lines under it needs to be idented.
28th Jul 2020, 5:23 PM
Arctic Fox
Arctic Fox - avatar
+ 2
Try this Yukthamukhi Rudra num=6 if num >5: print("greater") if num <= 6: print("equal")
28th Jul 2020, 5:20 PM
Sâgærāvürï
Sâgærāvürï - avatar
+ 1
See the indentation of the code in the inner if statement
28th Jul 2020, 5:17 PM
XXX
XXX - avatar
+ 1
num=6 if num >5: print("greater") if num <= 6: print("equal")
28th Jul 2020, 5:21 PM
Jayashree Nandan
Jayashree Nandan - avatar
0
I tried everything you said but i am still getting error
28th Jul 2020, 5:27 PM
Yukthamukhi Rudra
Yukthamukhi Rudra - avatar
0
Got it!! ! Thank you!!
28th Jul 2020, 5:33 PM
Yukthamukhi Rudra
Yukthamukhi Rudra - avatar