0

what's wrong with this else ??

https://code.sololearn.com/cLKa7t15J0a4/#py can someone explain why I am getting a syntax error at line 10 and help to make this code still smarter.

2nd Apr 2020, 6:36 AM
Mani
Mani - avatar
5 Answers
+ 5
You have to take care of your whitespaces! Indentation error means a.line starts with a wrong number of whitespaces... correct: for i in range(0,11,2): if i<=4: print("Low") else: print("High") This won't work: for i in range(0,11,2): if i<=4: print("Low") else: print("High")
2nd Apr 2020, 7:19 AM
Crash
Crash - avatar
+ 4
Hi, it is an indent error
2nd Apr 2020, 6:40 AM
Oma Falk
Oma Falk - avatar
+ 3
now it works enter three lines with yes to test.
2nd Apr 2020, 6:44 AM
Oma Falk
Oma Falk - avatar
+ 3
Match the indentation, all if else statements should have the same indentation
2nd Apr 2020, 6:49 AM
Bhavya
Bhavya - avatar
+ 1
Oma Falk So what should I do ??
2nd Apr 2020, 6:42 AM
Mani
Mani - avatar