+ 5
This is the easiest calculator in python
https://code.sololearn.com/cZGSa7rOWx9b/?ref=app
+ 2
Azli Hairil
1 Mahanayak Bhim Rao Ambedkar
MONSTER_hp
as the name suggests, this is Q&A Discussions. Means, the forum is for programming related questioning and answering only.
Plz be thoughtful here and don’t spam with hi-hello. 😇
And don’t forget to read the guidelines. Thanks! 😊
https://www.sololearn.com/discuss/1316935/?ref=app
+ 1
See my calculator. I did almost the same thing
https://code.sololearn.com/cyjh8S6LxnMm/?ref=app
0
There is actually plenty of mistakes here. I can help. You typed in: if operation == addition or Addition.... That is totally wrong. In the part you wrote 'Addition', you were supposed to add double quotation marks, like this: if operation == "Addition" or "addition" or "ADDITION". Next, when you wrote: print(add), that is also wrong. You must add str(add). e.g. : print( str(add))
0
You did the same mistake thrice. You forgot to put a colon. Mistake: elif operation == "Subtraction"...... You forgot to put a ' : ' . Fix this
0
Its not like that
0
Im sorry, but it didn't work
0
Yes
0
But idk why
0
Maybe you shouldn't use elif
0
OHHHH NOW I KNOW WHY
0
You used 'or' wrongly
0
This is what you should've done: elif operation == "Subtraction" or operation == "subtraction" or operation == "SUBTRACTION":
print(str(subtract))
0
The mistake is not because of elif....it is like i said before
0
This is what you should've done: elif operation == "Subtraction" or operation == "subtraction" or operation == "SUBTRACTION":
print(str(subtract))
0
You know...its a lot of work...to do this for every type of operation.
0
Is it working now?
0
JUMP_LINK__&&__Python__&&__JUMP_LINK How comes it doesn't print the first line when I run it? It asks for input right away
0
So how does it work then?
0
Thats why i never used 'or' statements



