0
What's wrong in this
num = 7 if num == 8: print("no,its not") else: if num >= 10: print("Yes,it is") else: if num <= 10: print("7 is smaller than 10") what's wrong in this. Explain in detail
2 odpowiedzi
+ 1
Your indentation levels are off.
Otherwise it's not technically wrong.
num = 7
if num == 8:
print("no,its not")
else:
if num >= 10:
print("Yes,it is")
else:
if num <= 10:
print("7 is smaller than 10")
it can be rewritten
num = 7
if num == 8:
print("no,its not")
elif num >= 10:
print("Yes,it is")
elif num <= 10:
print("7 is smaller than 10")
+ 1
Eco Fico already answered here
https://www.sololearn.com/Discuss/2250625/?ref=app