Question: Write a Python program that does the following. kinetic_energy() with two parameters mass and velocity. The function computes and returns the kinetic energy. main() with

Write a Python program that does the following.

kinetic_energy() with two parameters mass and velocity. The function computes and returns the kinetic energy.

main() with no parameters. It prompts the user with a question

Do you wish to process mass and velocity? y or n

If the user enters y, the code within the function prompts for the mass and velocity. The function then calls the kinetic_energy() function to compute the kinetic energy. It then displays the mass, velocity, and kinetic energy.

The function continues to prompt until the user enters something other than y.

Code the function kinetic_energy() first. Show the code to your instructor. After that code the function main().

Do not forget to invoke the main() function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!