Python Forum
Programming Difficult math in Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Programming Difficult math in Python
#3
(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:
 >>> x = 5 >>> (3 * x) ** 2 225 >>> def my_func(x): ... return (3 * x) ** 2 ... >>> my_func(5) 225 
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?).
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
Reply


Messages In This Thread
Programming Difficult math in Python - by Huntern - Oct-17-2019, 05:20 AM
RE: Programming Difficult math in Python - by Huntern - Oct-17-2019, 05:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to do "fixed size" (wrapping) math in Python? AlexanderWulf 13 5,825 Jul-19-2023, 04:13 PM
Last Post: deanhystad
  Math python question Deonvek 6 2,498 Apr-05-2023, 09:27 PM
Last Post: deanhystad
  difficult string conversion need help Pir8Radio 3 1,923 Nov-27-2022, 06:15 PM
Last Post: Gribouillis
  math.log versus math.log10 stevendaprano 10 4,741 May-23-2022, 08:59 PM
Last Post: jefsummers
  Math Package in python Uma 1 2,177 Dec-12-2021, 02:01 PM
Last Post: jefsummers
  Programming robots using Python OscarBoots 5 4,836 Oct-31-2021, 09:38 AM
Last Post: Larz60+
  creating simplex tableau pivot program easy or difficult for a beginner in Python? alex_0 2 3,595 Mar-31-2021, 03:39 AM
Last Post: Larz60+
  Why getting ValueError : Math domain error in trig. function, math.asin() ? jahuja73 3 5,394 Feb-24-2021, 05:09 PM
Last Post: bowlofred
  "SyntaxError: invalid syntax" running code in Doing Math With Python b saucerdesigner 2 3,569 Nov-03-2020, 04:23 PM
Last Post: saucerdesigner
  How to solve difficult non-linear equations? shreeniket 3 3,382 Apr-23-2020, 01:36 AM
Last Post: shreeniket

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020