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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started