+ 2

where is the mistake? please tell me

print ("hello") x=(str(input())) if x == "hello": print ("bye") elif x == "bye": print ("hello") else: print("I do not understand")

12th Aug 2020, 10:55 AM
иван
иван - avatar
6 Antworten
+ 5
Align the `elif` and `else` line at the same indent level to the `if` line.
12th Aug 2020, 10:58 AM
Ipang
+ 11
иван Indentation problem Indent elif to the align of if
12th Aug 2020, 10:59 AM
Piyush
Piyush - avatar
+ 9
иван Always Welcome. Goo speed and interest though. Keep it up🔥👌 ;)
12th Aug 2020, 11:06 AM
Piyush
Piyush - avatar
+ 4
your indents have a problem if, elif and else should be on same vertical line.
12th Aug 2020, 10:59 AM
Oma Falk
Oma Falk - avatar
+ 3
12th Aug 2020, 11:04 AM
иван
иван - avatar
+ 3
use the TAB button on the sololearn editor for a proper indention after the elif and else.
12th Aug 2020, 2:52 PM
Arrahman Abtahi