Oct-17-2019, 06:17 AM
(Oct-17-2019, 06:12 AM)perfringo Wrote: Should it convert automatically from one formula to another? If not you can write a function and keep x a variable:Example:>>> def first_iteration(x): ... return (4 * x) ** 5 ... >>> def second_iteration(x): ... return (20 * x) ** 4 ... >>> num = 5 >>> first_iteration(num) 3200000 >>> second_iteration(num) 100000000 >>>What do you mean by 'math on characters'?
Input = 2ln(x)
//python math to perform derivative of 2*ln(x)
Output = 2/x
Problem is, when specifying variables (typically x, y, z, r, theta ,phi) they need to remain variables- or characters in programming?) the typical math operations within coding only apply to INT variables - not char/string. I need some algorithm/ understanding of how to apply mathematical operands on characters. Sorry if this does not make sense, it is somewhat difficult to discuss programming math.
Cheers-Huntef