Share your repls and programming experiences

← Back to all posts
Calculator
hoop4life (264)

One of my first python projects, so have mercy please :)
But it still works so enjoy!!!

Commentshotnewtop
sanjaykdragon (181)

Why do you allow the user to divide by 0?

CodingChad69 (9)

@sanjaykdragon this is a very good addition. The code is hazardous without this change. Thank you for serving our community and pointing out these fatal flaws

sanjaykdragon (181)

@CodingChad69 yep, can't stand unsafe code in our community, can cause harm to our members

[deleted]

Very simple. Try and make some interesting alterations to it. But good, quite good.

iCodeNode (0)

Nice, but could be more efficient

smoothjacko (0)

This is a great program! You can shorten the program even more by using the eval() function. What it does is that you can take strings and input them into the eval function. an example would be eval('1' '+' '2'). This way, your code can go from 70 lines to around 20 or less.

iCodeNode (0)

@smoothjacko I agree, but I don't code python

JOELOUISN (4)

better than what i can do lmfao.