Calculator Fix | SoloLearn: Learn to code for FREE!

+2

Calculator Fix

https://code.sololearn.com/cp4rKr0JL1Vw/?ref=app

10/22/2020 8:23:34 PM

Algfish31

22 Answers

New Answer

+8

if o == "+": elif o == "-": ... Inputs are strings and you need strings to compare them with.

+3

Algfish31 do not ask for upvotes,t here is a high probability you will get downvotes,and why did you marked your comment as best? Russ answer should have been marked as best ,

+1

No problem.

+1

4*2 says 8

+1

Algfish31 after testing it out only I said that ,again tested it's still showing 8

+1

Oh ok ,you posted a comment 16 minutes ago saying it's showing 2 ,so I thought you were still facing problem

+1

Try the exception Handling here, so that it will become more simple for users.

0

Abhay im sorry, i thought it will mark both of our comments best and i did mark his comment best earlier

0

And i have 2 upvotes already

0

No need of using def https://code.sololearn.com/cfSXu74DXbem/?ref=app

-1

thanks

-1

But when i enter 4 * 2 it says 3

-1

oops 2

-1

it says 2

-1

test it out the link is in the title body

-1

now its working

-1

i dont know it said 2 2 hours ago

-1

Finished!

-1

-1

upfote i ment