Python Forum
need help with math functions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need help with math functions
#1
Hi I have these two codes here that i need to use math.sqrt for the 1st code and math.pow for the 2nd code, can anyone guide me how to do it?

x = 100 * (((f/i) ** (1.0/n)) -1)
b = i * ((1 + (x/100)) ** y)
Reply
#2
it's straight forward and the docs are clear. What problem you have? Show your attempt at using them
math.pow
math.sqrt
note that in the first one math.sqrt will work only for n=2. You can use math.pow for both.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  math.log versus math.log10 stevendaprano 10 2,315 May-23-2022, 08:59 PM
Last Post: jefsummers
  Why getting ValueError : Math domain error in trig. function, math.asin() ? jahuja73 3 3,707 Feb-24-2021, 05:09 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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