0

if 10 > 5: print("10 greater than 5") else: print("Program ended")

It show error .plz tell the reason and how to correct it

4th Nov 2018, 1:03 AM
Anshul Narwal
Anshul Narwal - avatar
1 Resposta
+ 2
There's an extra space before the else statement which causes the error. Always remember that proper indentation is important in python.👍
4th Nov 2018, 1:19 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar