Ask coding questions

← Back to all posts
How to fix
[deleted]

I am Trying to make a calculator in my project but I can't fix it I need help!

Answered by Coder100 [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100

yeah, you haven't really added any code to do the calculations yet, here's an example:

InvisibleOne

print(eval(input())) is the lazy way, or you can do something like this

IMayBeMe

Try to use if statements like this:

You can than repeat this with all the operations and just switch the sign