Share your repls and programming experiences

← Back to all posts
🔢 Calculator App | Math Wiz - Solves any problem 🔢
RYANTADIPARTHI

Calculator App | Math Wiz

hi guys, i made a calculator app in django. It's not the usual calculator in the console, but in visuals. It can solve a lot though.

Features

  • instructions
  • about
  • calculator

Instructions

There is already an instructions link in the site, but here's a deeper instruction part.

when putting in problems in the area, it should be only numbers. Once you click enter, it gives the solution above.

2 + 2

output:

like that.

If you put letters, you will get a little message :)

Feedback, and suggestions.

Upvotes, and suggestions would be appreciated.

Enjoy!

Voters
MemeManHimself
Polo1245Ofi
LegendaryWolf
BananaJellyfish
firedragondnd
XxMustardCatxX
ShadowWalker258
tsana
tchian316
SanjanaGidwani
Comments
hotnewtop
thrkturner


dang, it aint workin for me. yo @RYANTADIPARTHI

RYANTADIPARTHI

@thrkturner sorry, try it now.

thrkturner

@RYANTADIPARTHI ok, sorry for the late reply, I was in school

RYANTADIPARTHI

@thrkturner no problem.

thrkturner

it works now
@RYANTADIPARTHI

RYANTADIPARTHI
RhinoRunner

🔢 Calculator App | Math Wiz - Solves any problem 🔢


Guess it doesn't solve every problem...

RYANTADIPARTHI

@RhinoRunner you aren't supposed to put letters. Only nums.

JBloves27
BobTheTomatoPie

nice, but you should use latex to make the equations look cooler as you type them

RYANTADIPARTHI

@BobTheTomatoPie thanks! but, what's latex?

BobTheTomatoPie

its a way to sort out an equation so that when you write things like 1/2 the 1 will be position over a line that is over the two, im sure you can find a tutorial on it @RYANTADIPARTHI

BobTheTomatoPie
BobTheTomatoPie
RYANTADIPARTHI

@BobTheTomatoPie oh. ok, thanks!

RYANTADIPARTHI
zaydi

Yo good job and THREE LINES OF CODE G G
also how is there open in new tab but good job and also problem popper can do this too but looks a bit worse

RYANTADIPARTHI

@zaydi uh thanks! but, i don't get what you mean.

zaydi

@RYANTADIPARTHI oh its just problem popper can only do some stuff like this

zaydi

@RYANTADIPARTHI and good job

RYANTADIPARTHI

@zaydi ah ok.

RYANTADIPARTHI

@zaydi Thanks.

zaydi
tussiez

Nice! As someone else as said, floats don't work, so you may need to round to a certain decimal point

RYANTADIPARTHI

@tussiez yeah. Thanks!

RishabTirupath1

This is a very nice website! However, floats don't really work, as with any language, so you could work on that next.

RYANTADIPARTHI

@RishabTirupath1 thanks, and i'll work on it.

CharlieS6289

Sorry to be annoying but can it solve algebra or is there a limit to the size of the problem because it couldn't solve the problem that I put in.

RYANTADIPARTHI

@CharlieS6289 hmm, i don't think it has a limit. I'm not sure though.

IntellectualGuy

Can you make the calculator centered on the page?

RYANTADIPARTHI

@IntellectualGuy it is centered.

DavidHilsee

uhh exponents kinda dont work... sometimes the ^ symbol acts like a + and sometimes like a -

DavidHilsee

nevermind, you just put ** instead of ^ @DavidHilsee

RYANTADIPARTHI

@DavidHilsee yes. That's what i was thinking.

DerpBurgerPlayz

it cant even solve α0=0+α0=ax+(−ax)+a0=α(0+x)+(−αx)=αx+(−αx)=0...

DerpBurgerPlayz

@DerpBurgerPlayz i can solve this in three seconds-
its −1(x)=−x

RYANTADIPARTHI

@DerpBurgerPlayz an well, idk. It should work.

RYANTADIPARTHI
RYANTADIPARTHI

@DerpBurgerPlayz. solves actually, but idk.

DerpBurgerPlayz

@RYANTADIPARTHI already have XD

RYANTADIPARTHI
RYANTADIPARTHI

@DerpBurgerPlayz i figured out why it gets it wrong. Use ** instead of ^

DerpBurgerPlayz
DerpBurgerPlayz

is this it?

RYANTADIPARTHI
TheCheeseCoder

@RYANTADIPARTHI

huh?

there's no main.py file apparently

[deleted]

Hey, @TheCheeseCoder, ru a cuber, ur google account profile is of a cube. If yes, even ima cuber! my 3x3 PB is 13.34.

RYANTADIPARTHI

@TheCheeseCoder hmm, it should be working. Try it now.

TheCheeseCoder

@CaptinNeo

Yes i am a cuber!

join our cubing gang

https://repl.it/teams/join/dhrmtvflgdkfkqmdvucxiptjoxoykkjr-NEoNcuberz

copy and paste it in the searchbar

TheCheeseCoder

@TheCheeseCoder

or just click on it

[deleted]

WTF @TheCheeseCoder, the guy named @daksheshdorala has the same pb as mine! one in a million coincidence!

[deleted]

@TheCheeseCoder, I can help you in the among us game but I don't really know how to make a chat application which is in among us meetings.

Whippingdot

IT DON'T WORK FOR ME...WHY...WHY DOESN'T ANYTHING WORK FOR ME. but really nothing works for me. Whenever I see a program it doesn't work...how unlucky am i?

RYANTADIPARTHI

@Whippingdot server down. Try it now.

thrkturner

woah dude cool

RYANTADIPARTHI

@thrkturner Thanks!

Bookie0

pretty cool, except like you can see with the above image, that is visibly wrong.

also you might want to change the title, we (rather I), I can't really see those characters.

Maybe instead of making the result appear on the top, you could put it directly on the text field like a real calc:

(where the yellow oval is)

and maybe a way to view your history! :D

RYANTADIPARTHI

@Bookie0 yeah, thanks for all those suggestions. But it the calculator shouldn't move to the right. It doesn't for anyone. Maybe it's server issue. Also, i'll try those side calculations.

Thanks!

Bookie0

@RYANTADIPARTHI yea I think it's because I resized my window a bit, but still the result of a calculator normally should appear in the textbox! :)

RYANTADIPARTHI

@Bookie0 yeah, i'll work on them.

Bookie0

alrighty, good luck!! :D @RYANTADIPARTHI

RYANTADIPARTHI

@Bookie0 Thanks!

RYANTADIPARTHI

@Bookie0 also, i figured out why it gets it wrong. Use ** instead of ^

Bookie0

@RYANTADIPARTHI works well! You could maybe change so that it accepts ^ too as it’s used a lot! :)

RYANTADIPARTHI

@Bookie0 yes, i will try that.

Bookie0

cool, gl! @RYANTADIPARTHI

FlaminHotValdez

ur calculator is bad. it doesn't solve basic math equations properly 2^3-8*8^2+2^3+2 the output was -64, should be -494.

RYANTADIPARTHI
Whippingdot

u don't know math @RYANTADIPARTHI

RYANTADIPARTHI

@FlaminHotValdez i figured out why it gets it wrong. Use ** instead of ^

FlaminHotValdez

@RYANTADIPARTHI oh, okay. like normally we use ^ instead of **

RYANTADIPARTHI

@FlaminHotValdez yeah. But in the coding world, it's **

FlaminHotValdez

@RYANTADIPARTHI bruh...I looked at the code... you used EVAL?! legit anyone could do this if they know how to use django and html -_- at least TRY to integrate ^ for exponents instead of using the built-in python function...

FlaminHotValdez

@RYANTADIPARTHI Only in Python. In C++, we have a power() function. Not to razz on you but this isn't really anything unique, the core is just the eval() function and everything else is basically django and html to make it pretty. Some people actually put a lot of effort into making calculator codes that aren't just eval(), me included. plz try to do this without eval, it's rly not anything special, it's an overdone idea that doesn't have anything unique.

RYANTADIPARTHI

@FlaminHotValdez ok. You don't know django. You don't know what can be done in django. So how can you say stuff like that? There are only a few ways. They are given like that. How you say, can't be done in django. PLease don't say these things if you don't know django.

FlaminHotValdez

@RYANTADIPARTHI no, I'm not saying it can't be done in Django, I'm saying anyone that knows django and html can do this with the eval() function, but not everyone can think of a working algorithm to actually make a calculator.

RYANTADIPARTHI

@FlaminHotValdez no. It doesn't just take django either, it takes python too. you can't assume. Eval will be used most everywhere. no other way. But i will try it though.

FlaminHotValdez

@RYANTADIPARTHI ...ok, thnx...my point is pretty much that there are less ppl that know how to make an app and use eval than ppl that can get a legit calculator algorithm, so as long as u know app development and python u can do it. there are not a lot of ppl that know how to make a legit calculator program. If u can't figure it out I made a code in C++ for a calculator program, it uses stack. https://repl.it/@FlaminHotValdez/Calculator

RYANTADIPARTHI

@FlaminHotValdez no problem. But one thing is, your code is like if statements. I didn't want to hard code it. I wanted every operator. Also, your repl doesn't work. IT gives an error.

FlaminHotValdez

@RYANTADIPARTHI ? it does?

FlaminHotValdez

@RYANTADIPARTHI Ok, I fixed it. My program actually does do every operator, with PEMDAS too. The ifs are to determine the order of operations, that's why.

RYANTADIPARTHI

@FlaminHotValdez yeah, so that's kind of a hard code. I want to use every operator.

FlaminHotValdez

@RYANTADIPARTHI yeah...but that's the only way to implement order of operations as far as I know, and I googled like 50 different pages and 20 different tutorials on youtube, so yeah.

FlaminHotValdez

@RYANTADIPARTHI That being said though, it might be rather hard to do in Python due to the lack of a system stack.

RYANTADIPARTHI
[deleted]

Cool!

RYANTADIPARTHI
gibbsfreenergy

not bad, stands out a lot from other calculators, good job

RYANTADIPARTHI