Maybe I'm dumb but I've been searching for a while and I can't seem to find an answer to this question: I'm creating a simple program to do my math homework faster, but I'm struggling in using variables such as X and Y.
Let's say the following:
price = 50q + 80
earnings = price * q (q is the quantity of produced items)
the result would be earnings = 50q^2 + 80q , but how exactly can I store a value such as 50q^2 and then use it as a number?
I have tried storing the coefficients into float variables, that way the multiplication would become:
earningsA = priceB , earningsB = priceC (the letters represent the coefficients)
, but that creates a mess when working with more than 1 variable, just think about dividing the result by X.