0
Pls tell me what is my mistake in this program?? I am confused.
5 Answers
+ 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
+ 5
invalid syntax is bcoz indentation error(probably) see Shamima 's answer
+ 4
1. A LOT of indentation errors.
Suggestion :- use elif, instead of else and if s
+ 1
Thanks @Meharban Singh
0
But it shows "invalid syntax" if i use elif