Python Forum
please help me convert this formula via the math module
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
please help me convert this formula via the math module
#1
the formula is in the pic and i tried typing it:
b=5√(K*∛(0,01)+(1-e^x)^2 )
thank you!

Attached Files

Thumbnail(s)
   
Reply
#2
** is the power operator, not ^. You can also use the power operator for roots x ** (1/2) is square root and x ** (1/3) is cubed root. For Euler's number (e) you will need to look at the math library. You'll also find functions for ex (exp(x)), xy (pow(x, y). There is no function for roots, but you can use pow() with a fraction for the exponent.

https://docs.python.org/3/library/math.html
tinx_ss likes this post
Reply
#3
So you would write it in like that? And that would work or show the results of the function or definition when used or appropriate. example. But is this correct procedure in Python on writing out the math and Python programming? The formula would turn into h = e**2. Written on the screen the correct way or as seen on the attachment. Something like it.

h = input((exp(x))
print('you forgot + C for the formula')
Programs are like instructions or rules. Learning it gets us closer to a solution. Desired outcome. Computer talk.
Reply
#4
Error:
ERROR! Traceback (most recent call last): File "<main.py>", line 13, in <module> File "<main.py>", line 11, in mypicture AttributeError: 'str' object has no attribute 'open' === Code Exited With Errors ===
My online compiler showed me this. But the class Image module which is in my chrome has an open method. So this is one thought to bring up when working with online compilers. The module will ask for one position argument to give. Then the output.
Programs are like instructions or rules. Learning it gets us closer to a solution. Desired outcome. Computer talk.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Math Module import Jack_Sparrow 3 6,686 Apr-30-2018, 01:41 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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