+ 4

can you make it work?

it's my calculator https://code.sololearn.com/c8mTgDE52xJu/#py can you make it work?

9th May 2017, 6:29 PM
Hysji
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 ;)
10th May 2017, 4:51 AM
visph
visph - avatar
14th May 2017, 6:23 AM
David Gedalia Ordman
David Gedalia Ordman - avatar
+ 6
משגב, מה נשמע?
14th May 2017, 6:12 AM
David Gedalia Ordman
David Gedalia Ordman - avatar
+ 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).
9th May 2017, 7:18 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
tx
9th May 2017, 7:43 PM
Hysji