+ 4
can you make it work?
it's my calculator https://code.sololearn.com/c8mTgDE52xJu/#py can you make it work?
5 ответов
+ 7
Python interpreter get lost if you mix tab and spaces, and if you doesn't provide same number of them inside a block... but doesn't get lost if you're not regular in number used between different blocks, or use another number than 4... However, it's get more human readable to follow these rules ;)
+ 6
משגב, מה נשמע?
+ 4
You have to de-indent the elif clauses by one space. They stick out too much and do not constitute a proper block with the main "if" clause.
Also, make sure you are putting equal indents everywhere - four for the block under while True and another four for sub-blocks each time. I see you now have three or five sometimes. Python interpreter gets lost if you don't keep your indentation regular.
That will make your code work properly (checked).
+ 3
tx