Jump to content

Python. Are these possible ?

koqe3's Photo
Posted Sep 18 2012 12:26 PM
3238 Views

1)Write a function that takes three numbers as parameters, and returns the
centrifugal force. The formula for centrifugal force is:
F = mrW2
F is force, r is radius, W is angular velocity.
.......................................
2) Write code to ask user for the three parameters in the above function, call the function and print out the result
...................................................
3) Correct the following code so that it makes you print the reverse of the string that you submit:
def reverse ( text ):
result =""
text_length = len ( text )
for i in range ( text_length ):
result = result + text [i* -1]
text =" Programming is the coolest thing ever ."
print ( reverse ( text ))
..............................................
4) Write a function that takes three numbers and prints out the largest number
..................................................
5) Write a function that takes value of the temperature in Fahrenheit and converts and prints the value in Centigrade.
C/100 = (F-32)/180

Tags:
0 Subscribe


2 Replies

0
  Zenettii's Photo
Posted Sep 19 2012 10:26 AM

Answer: Yes
+ 1
  LaptopForHire's Photo
Posted Sep 20 2012 07:03 AM

Yep, all very straightforward.

Good luck on your homework.