Share your repls and programming experiences

← Back to all posts
Mah Calculator
epicman702 (218)

My first try at coding without help

Case_Buttitta (41)

Here is my calculator, it uses eval so that my code works much more easily and I won't have to write out every single operation.

HarveyH (173)

I am confused. Can u help me pls?

epicman702 (218)

@HarveyH I will try my best. You type a number, any number. then you type a function. Like plus, minus, multiply and divide. (the code only takes these). Then you type another number. remember to press enter after each one.

LightninMcQuade (41)

Hey whenever I press enter I get an error can you check that out?

Yamboy1 (37)

@LightninMcQuade @epicman702 The error is because when you press enter, it tries to convert an empty string into an Int (number), however that's impossible, so it crashes

a5rocks (801)

@LightninMcQuade Try the following inputs : enter 1 enter "plus" enter 1 enter

epicman702 (218)

@LightninMcQuade Yeah. you were meant to type a number then press enter.

epicman702 (218)

pls open for tutorials