0
Nested if;python,why is this code not coreect
6 Antworten
+ 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.
+ 2
Try this Yukthamukhi Rudra
num=6
if num >5:
print("greater")
if num <= 6:
print("equal")
+ 1
See the indentation of the code in the inner if statement
+ 1
num=6
if num >5:
print("greater")
if num <= 6:
print("equal")
0
I tried everything you said but i am still getting error
0
Got it!! ! Thank you!!