Share your repls and programming experiences

← Back to all posts
Calculator With Working Queue and Problem Naming (500 Cycles Special)

### This is my first project that isn't a game!

I hope you guys enjoy it. I spent a long time figuring out how to get the working Queue and everything. It took a while. Updates will come and I will add more features such as more complex problems.

### It is error-proof

Feel free to try and break it. You won't. I spent a lot of time making sure there are no errors.

### Updates Will Come

As I said before I will add updates so you can enter more complex problems with more variables and just be able to find the answer to anything.

### Thanks to eekboi on the discord

Eekboi taught me about queue's and helped me incorporate them into a reply project.

### I will not be leaving Repl.it

I was thinking about leaving Repl.it because it does not have every module but I have decided to stay.

### Enjoy!

Upvote if you enjoyed
By BobTheTomatoPie

I was thinking about leaving Repl.it because it does not have every module but I have decided to stay.

You know, you can press Ctrl-Shift-S and open up a terminal. Then just type in `pip install <package>`. Then, you can use the module!

BobTheTomatoPie (1062)

wow, thats awesome i never knew that, thanks! @adityaru

thenullified (150)

this is unexpected...

RayvelArjoon (88)

You should make this calculator a bit better by making it have functions for trigonometry. (Sine, Cosine, Tangent). You could also include logerithmic functions for people who would like to use that too.

BobTheTomatoPie (1062)

Yeah, this is its first release and i plan to get into it @RayvelArjoon

firefish (524)

@BobTheTomatoPie and maybe sqrt. Also 0/x = 0 and x/0 is undefined.

[deleted]

strnage calc

BobTheTomatoPie (1062)

Idk what that means but thx ig @Zuhdi28

[deleted]

@BobTheTomatoPie you shouldn't be thx
cuz i wrote it is a Strange Calc

BobTheTomatoPie (1062)

so it was mean or just like very unique or ... @Zuhdi28

CoolJames1610 (619)

What does this 'queue' do?

BobTheTomatoPie (1062)

It keeps track of the order you did the problem the problem name the equation and the answer @CoolJames1610

CoolJames1610 (619)

ah cool, I could use MongoDB to do something like that but this isnt a database XD good work! @BobTheTomatoPie

CoolJames1610 (619)

lol i love mongodb XD ive created two projects with it and another one im currently working on XD - should rename myself to MongoDB XD

BobTheTomatoPie (1062)

Lol, i have no idea who mongodb is ill check it out @CoolJames1610

NoelB33 (314)

Mongodb is awesome, you should make a tutorial on it in python! @CoolJames1610

Bookie0 (3942)

Aha I found an error!

BobTheTomatoPie (1062)

Darn it dont divide by zero
@Bookie0

firefish (524)

@Bookie0 You divided by zero... no wonder it won't work

Bookie0 (3942)

Yea, I know, I was testing to see if it would it would give me an error message, but I was just pointing out that it’s still a little crack in the system... @johnstev111

firefish (524)

@Bookie0 All calculators throw errors upon dividing by zero

Bookie0 (3942)

Yea I know, but maybe the creator could add something to not let people try and do that... @johnstev111

BobTheTomatoPie (1062)

I made it so if you divide by zero it equals zero now try it again @Bookie0

firefish (524)

@Bookie0 Or do anything else undefined... i.e. 0^0

BobTheTomatoPie (1062)

You have to reload the page first @Bookie0

Bookie0 (3942)

Hum i did , several times, yet it still gives the error @BobTheTomatoPie

firefish (524)

@BobTheTomatoPie Just make a popup message any time someone tries to do `x/0` or `0^0`

BobTheTomatoPie (1062)

alright sounds good ill add it @johnstev111

Bookie0 (3942)

0 to the power of 0 is 1.
Anything to the power of 0 = 1 @johnstev111

firefish (524)

@BobTheTomatoPie Note: `0^0` = `0**0`

BobTheTomatoPie (1062)

Thanks ill add that didnt realize that symbol was there @johnstev111

firefish (524)

@Bookie0 Wait... I thought 0^0 was special

firefish (524)

@BobTheTomatoPie According to Bookie0 it's 1 because x^0=1... I thought 0^0 was a special case and was undefined

BobTheTomatoPie (1062)

Oh lemme check up on that, I think i might have added something to prevent error that made the answer a 1 @johnstev111

BobTheTomatoPie (1062)

Oh okay I was just wrong with the math i guess @Bookie0

firefish (524)

@BobTheTomatoPie `**` and `^` do the same thing, but some people might not know what the former is so good addition

BobTheTomatoPie (1062)

You guys can divide by zero now @johnstev111

firefish (524)

@BobTheTomatoPie It's meant to have like a message saying "oh you can't do that" or something and then carry on as if nothing happened because x/0 is undefined

BobTheTomatoPie (1062)

it says undefined for the answer @johnstev111

Bookie0 (3942)

Idk I typed calculator on google, and it gave me one. But x ^ 0 where x isn’t 0 (ex 7^0 ) = always 1 @johnstev111

firefish (524)

@Bookie0 I know but 0^0 is undefined

Bookie0 (3942)

Idk maybe google calculator is [email protected]

BobTheTomatoPie (1062)

its apparently one on google calculator @johnstev111

firefish (524)

@Bookie0 x^0=1 except for when x=0 in which case it's undefined

firefish (524)

@BobTheTomatoPie You can't do square roots either

Maybe ignore the last line

CodingCactus (3029)

you aren't even at 500 cycles lol

BobTheTomatoPie (1062)

Lol i notice now but five away is fine @CodingCactus

BobTheTomatoPie (1062)

No, but its not the same thing @CodingCactus

CodingCactus (3029)

@BobTheTomatoPie well, it is, it is just a calculator

BobTheTomatoPie (1062)

Yeah and there are 100's of calculators on repl, on mine you can name your equation and it has a working queue @CodingCactus

CodingCactus (3029)

@BobTheTomatoPie ok..... why would you want to name your equation?
it can only handle two terms

BobTheTomatoPie (1062)

Did you come here to be a jerk? Cause if that's the case you can go @CodingCactus

BobTheTomatoPie (1062)

This took me a long time to make and it was hard so I don't want you to just call it a stupid program I'm proud of it and if you're just gonna say every reason why it shouldn't be a program then I don't get you. @CodingCactus

Bookie0 (3942)

Don’t worry it isn’t a stupid program, it’s pretty cool! I like that it’s unique @BobTheTomatoPie

Bookie0 (3942)

But they have a point, it is kinda different and unique, even if it has just two terms. @CodingCactus

BobTheTomatoPie (1062)

Thanks, CodingCactus is just upset his is only one line of code @Bookie0

CodingCactus (3029)

@BobTheTomatoPie lol, you take things way too personally and I don't remember saying that it was stupid?

BobTheTomatoPie (1062)

I don't think you'd like it if you spent a lot of time on something that you were proud of just for someone to say ive made something better than this and it was only one line of code @CodingCactus

CodingCactus (3029)

@BobTheTomatoPie It doesn't matter what someone else thinks of something you've made as long as you are happy with it

Bookie0 (3942)

Yea, but they are correct in a way, you can just do that one line. But yours is also cool. Maybe you can add a feature where the user choose how much facteurs, so that you can calculator not just two numbers. :) @BobTheTomatoPie

BobTheTomatoPie (1062)

I'm happy with it, i just don't get why you took the time out of your day to point out that you think yours is better. @CodingCactus

BobTheTomatoPie (1062)

I was planning on adding that, this was just my first version @Bookie0

CodingCactus (3029)

@BobTheTomatoPie If you find me saying that mine is better, then I'm sorry, but I don't remember saying that this was bad

firefish (524)

@CodingCactus You did say yours was better, but I didn't read anything about you saying that @BobTheTomatoPie 's calculator was bad or anything

firefish (524)

@CodingCactus You didn't directly say any of those things, but your words hinted them

CodingCactus (3029)

@johnstev111 that is more of a hint and tip

firefish (524)

@CodingCactus Not exactly tip.. If you were to say "Are you aware of my thing that does the same thing" you are implying that your thing is superior

CodingCactus (3029)

@johnstev111 it is not my thing, it is just a common use of eval

firefish (524)

@CodingCactus Yes but you typed that code out so you wrote the program, therefore it is yours

Warhawk947 (520)

@CodingCactus @BobTheTomatoPie @johnstev111 Just break it up already, it's just a misunderstanded statement chillax

CodingCactus (3029)

@Warhawk947 lol I thought this was already over?

BobTheTomatoPie (1062)

We broke it up a long time ago, its all good @Warhawk947

elijahnik1 (166)

@BobTheTomatoPie I agree, these are also very different calculators(yours and Coding Cactus). plus I like the name addition because (for example), I could use it for math in school. name the first thing: problem one, then have the equation. then for the second one have problem 2, 100000**12 and if I need to combine then later I see both the answers! really cool calculator!!!

Warhawk947 (520)

@Warhawk947 didn't read the timestamps :)

Bookie0 (3942)

But maybe fix Operations / 0 @BobTheTomatoPie

Bookie0 (3942)

But otherwise it’s great,! :) @BobTheTomatoPie