Share your repls and programming experiences

← Back to all posts
##### Algebra Calculator

A single variable calculator. You need to have two sides of the equal sign, and you can put as many x's as you want. You have to separate the variables from the numbers with an *, or else it will pop up with an error, and no spaces. Other than that, it's pretty easy.

##### Comments
hotnewtop
XanthusPettitt (10)

hey can you explain this to me bc im having a really hard time reading the code

GavinSwanson (5)

@XanthusPettitt
So, the way I designed this was I made it so that it goes through every value of x until the equation is true, but I think I messed it up a while ago. I can try to revert it to its original state, where it is much easier to understand. And you also had to put double equals signs

XanthusPettitt (10)

@GavinSwanson oh thats a nice way to do it im trying to do a x calc and im having a little bit of trouble but that helps thanks!

GavinSwanson (5)

@XanthusPettitt
So, I can't really figure out what went wrong in this code, and to me, this should work. If you're good with calcs, could you tell me where I went wrong?

XanthusPettitt (10)

@GavinSwanson umm sure lemme copy it to get a better look

XanthusPettitt (10)

@GavinSwanson I think its because the answer might be more percise than 2 digits past the decimal point so its skipping it

XanthusPettitt (10)

@GavinSwanson also x could be bigger than 101

XanthusPettitt (10)

@GavinSwanson oh yeah and with furthermore the if statment is a correct one as no syntax error but I dont think it will ever be true

XanthusPettitt (10)

@GavinSwanson you can also check if there is an 'x' or an 'X'

XanthusPettitt (10)

@GavinSwanson sorry im probably bombarding you with messages ill stop now