0

Pls tell me what is my mistake in this program?? I am confused.

https://code.sololearn.com/cWXFMZPgIrFJ/?ref=app

26th Apr 2017, 9:57 AM
sTiNgRaY
sTiNgRaY - avatar
5 Réponses
+ 25
Indentation matters in Python. if, elif, else all should be indented in same manner. I've edited your code here, now it works. Give input like this: add 4 5 quit If you don't give "quit" at last, it'll cause eoferror since it's an infinite loop. https://code.sololearn.com/ccNHSY9EkU6u/?ref=app
26th Apr 2017, 12:10 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 5
invalid syntax is bcoz indentation error(probably) see Shamima 's answer
26th Apr 2017, 2:07 PM
Meharban Singh
Meharban Singh - avatar
+ 4
1. A LOT of indentation errors. Suggestion :- use elif, instead of else and if s
26th Apr 2017, 10:01 AM
Meharban Singh
Meharban Singh - avatar
+ 1
Thanks @Meharban Singh
26th Apr 2017, 11:09 AM
sTiNgRaY
sTiNgRaY - avatar
0
But it shows "invalid syntax" if i use elif
26th Apr 2017, 11:11 AM
sTiNgRaY
sTiNgRaY - avatar