I'm working on a self-project called 'Project Calculus' (Not that you care about the name). It's a huge calculator that works cross-platform and only uses 'already implemented' modules (So no SymPy, no NumPy, no SciPy, et cetera.) in it.

I need help (If you even bother to cooperate with a newb x]), and here is what I need help on.

- replacing variables with something else, like this:

x = x-4
# Say you have x^2 - 4*x. Now replace all x with (x-4).
# I would like the result to be something like (x-4)^2 - 4*(x-4).

- simplify algebraic expressions:

(x-4)^2-4*(x-4)
# Simplify this to get -12*x+32+x^2.

- rearrange expressions to proper degree order:

-12*x+32+x^2
# Change to x^2-12*x+32

Obviously, 90% of you would not want to help me on such an absurd script, also because I'm a beginner. But I'd appreciate help, and if I appreciate your posts, I would be happy to add you to the credits. x]

So, uh... I don't necessarily care about the 3rd (rearranging order by degree). That's perfectly optional. :P

Also, if you have something like "do it yurself, i dunt care", your statement shall be ignored. If you say "Do some work" and not give me a code (even a tiny snippet), fine by me. All depends on whether your tip was useful. If you say "This is not a project for a beginner", I understand. But I do have experience with Python (although very limited).

If you think I'm trying to think I'm trying to boss all you around, I'm not. Whether you help me or not is all up to you. I'll admit I'm kind of self-centered, though. >.>

So, um.... I'll end this post now.

Edited 6 Years Ago by KrazyKitsune: n/a

First of all, I think we need more information why you are playing around with some variable names, as we do use variables to store values, and values are what we care about, not how they look. So, say you get a value from the user, store it in X and then do whatever you want to it!!!!! x - 4 then to the power of 2, one by one. I guess that's the notion of arithmetic operation and you use probably, "Divide and conquer" to solve one by one. (X^2)-4*(X-2) or something similar is merely performing operation on X.

By the way, please stop writing diaries on your post. We are interested in your problem, code and related... Not how you feel, how you credit people and so on.

Thank you

group: Primary part is second part of my help request. :P

griswolf: Err... yes, but this isn't really a 'tool'. Just call it an all-in-one. Tool + Boredom Killer + Frustration Pill + Python Practice + Extra Credit in Grades thing. x]

So I'd like most of the help to be focused on the second part.

Edited 6 Years Ago by KrazyKitsune: n/a

Oh, gawd, finally got it figured out. >.>

Sorry for making you think.

I might make more help threads later...

:P

This question has already been answered. Start a new discussion instead.