Python Forum
programming different formulas in need of help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
programming different formulas in need of help
#1
D= the diameter of the storm in miles
t=time in hours

t=sqaure root of d to the power of 3 divided by 216

Can anyone give me suggestions on how to go about programming this?
Reply
#2
What have you tried? If you're being asked to do this as some exercise, you must have learnt basic things like variables and the operators you can use on numbers.
Reply
#3
import math
diameter=float(input("Enter diameter in miles"))
miles= diameter ** 3
time=(miles / 216)
print("The storm will last", time, ("hours!"))
This is what I have done, I'm not sure how to add the math. sqrt for the diameter to the power of 3
Reply
#4
Hint: taking the square root of a number is the same as raising that number to the power of 0.5.
Reply
#5
Okay yes! I think that works! thank you for your help!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Verilog HDL Programming to Python Programming? noobcoder 1 3,039 Jul-18-2019, 09:28 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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