Oct-17-2019, 05:56 AM
(Oct-17-2019, 05:50 AM)perfringo Wrote: I don't understand exactly what is the problem you try to solve but maybe examples below can help:Thanks for the response! So one problem I am having is I want x to remain a variable. I do not want to assign an integer as x. I want to perform math on x as a Variable(character?).>>> x = 5 >>> (3 * x) ** 2 225 >>> def my_func(x): ... return (3 * x) ** 2 ... >>> my_func(5) 225
For example I want to input:
equation =4x^5
Derivative= 20x^4.
I know how to perform this math on paper. I am also familiar with logic but I do not see how it could be used for this problem specifically. Long story short, I need to perform math on characters rather than ints