0

How do I input 'else statement' in python?

I inputted else: but its returning SyntaxError: invalid syntax

9/13/2019 6:19:01 AM

Muhammed Abdulmalik

8 Answers

New Answer

+1

Did you put an if: statement before it?

+1

Probably you didn't write if before.

+1

a = 9 b = 2 if a>b: print("a is greater then b") else: print ("b is less then a")

+1

Black j... Maybe its my indentation.

0

Gabi jo... No

0

KfirWe, yes I didnt

0

Thank you all.

0

Muhammed Abdulmalik 4 spaces ok.. your welcome