+ 5
21st Nov 2020, 3:45 PM
Syed Abdullah Bukhari
+ 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
21st Nov 2020, 9:21 AM
Nasif Rahman
+ 1
See my calculator. I did almost the same thing https://code.sololearn.com/cyjh8S6LxnMm/?ref=app
20th Nov 2020, 9:20 AM
mnaeem08
mnaeem08 - avatar
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))
20th Nov 2020, 9:00 AM
mnaeem08
mnaeem08 - avatar
0
You did the same mistake thrice. You forgot to put a colon. Mistake: elif operation == "Subtraction"...... You forgot to put a ' : ' . Fix this
20th Nov 2020, 9:13 AM
mnaeem08
mnaeem08 - avatar
0
Its not like that
20th Nov 2020, 9:17 AM
mnaeem08
mnaeem08 - avatar
0
Im sorry, but it didn't work
20th Nov 2020, 9:19 AM
mnaeem08
mnaeem08 - avatar
0
Yes
20th Nov 2020, 9:21 AM
mnaeem08
mnaeem08 - avatar
0
But idk why
20th Nov 2020, 9:21 AM
mnaeem08
mnaeem08 - avatar
0
Maybe you shouldn't use elif
20th Nov 2020, 9:21 AM
mnaeem08
mnaeem08 - avatar
0
OHHHH NOW I KNOW WHY
20th Nov 2020, 9:24 AM
mnaeem08
mnaeem08 - avatar
0
You used 'or' wrongly
20th Nov 2020, 9:24 AM
mnaeem08
mnaeem08 - avatar
0
This is what you should've done: elif operation == "Subtraction" or operation == "subtraction" or operation == "SUBTRACTION": print(str(subtract))
20th Nov 2020, 9:26 AM
mnaeem08
mnaeem08 - avatar
0
The mistake is not because of elif....it is like i said before
20th Nov 2020, 9:27 AM
mnaeem08
mnaeem08 - avatar
0
This is what you should've done: elif operation == "Subtraction" or operation == "subtraction" or operation == "SUBTRACTION": print(str(subtract))
20th Nov 2020, 9:27 AM
mnaeem08
mnaeem08 - avatar
0
You know...its a lot of work...to do this for every type of operation.
20th Nov 2020, 9:28 AM
mnaeem08
mnaeem08 - avatar
0
Is it working now?
20th Nov 2020, 12:54 PM
Solomon
Solomon - avatar
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
20th Nov 2020, 1:03 PM
Solomon
Solomon - avatar
0
So how does it work then?
20th Nov 2020, 1:06 PM
Solomon
Solomon - avatar
0
Thats why i never used 'or' statements
20th Nov 2020, 1:11 PM
mnaeem08
mnaeem08 - avatar