+ 1
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 please tell
2 odpowiedzi
+ 2
You have used wrong else statement on line no 7. This should be look like 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")
0
You can't use else statement twice for just one if statement.