Skip to content
← Back to Community
My Calculator
Profile icon
muhayyo

Basic Calculator - simple and easy to understand. Performs +, -, * and /
https://repl.it/@muhayyo/My-Calculator

Voters
Profile icon
Jean-LucCabaco
Profile icon
emilian1000000
Profile icon
Nosrep
Profile icon
LardBoi
Profile icon
heckerman100
Profile icon
muhayyo
Comments
hotnewtop
Profile icon
big0

the best way is
return a + b

and so on for all operator ;)

Profile icon
LardBoi

i broke it in seconds

you should make input checks so someone like me doesnt type in what they want instead of the corresponding number.

Profile icon
Nosrep

you should have used an else: statement so someone doesn't just type "kh sff d" and get an error, but it's cool

Profile icon
emilian1000000

To make it easier and save a lot of space, you should have used the eval() function.

Profile icon
HappyFakeboulde

Good, but it is possible to make one in just one or two lines in Python 3

Profile icon
muhayyo

Thanks for comments!! I'll work on suggestions. Cheers