PLEASE USE THE PYTHON PROGRAMMING LANGUAGE FOR THIS QUESTION. answer all questio
ID: 3886351 • Letter: P
Question
PLEASE USE THE PYTHON PROGRAMMING LANGUAGE FOR THIS QUESTION. answer all questions, please.
1. The kinetic energy of a moving object is given by the formula KE=(1/2)mv2, where m is the object’s mass and v is its velocity. Modify the program you created in Project 5 so that it prints the object’s kinetic energy as well as its momentum.
2. Write a program that takes as input a number of kilometers and prints the corresponding number of nautical miles.
Use the following approximations:
*A kilometer represents 1/10,000 of the distance between the North Pole and the equator.
*There are 90 degrees, containing 60 minutes of arc each, between the North Pole and the equator.
*A nautical mile is 1 minute of an arc.
Explanation / Answer
1] Code and Output
# taking user input of mass
mass = int(input("Enter mass: "))
# taking user input of velocity
velocity = int(input("Enter velocity: "))
# calculating ke
ke = (1/2.0)*mass*velocity*velocity
# printing ke
print("Kinetic Energy = ",ke)
# taking user input of mass
mass = int(input("Enter mass: "))
# taking user input of velocity
velocity = int(input("Enter velocity: "))
# calculating ke
ke = (1/2.0)*mass*velocity*velocity
# printing ke
print("Kinetic Energy = ",ke)
Output Enter mass: 10 Enter velocity: 5 Kinetic Energy = 125.0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.