Write a program in python using the def function to calculate the kinetic energy when an object reaches ground

computer science


Write a program in python using the def function to calculate the kinetic energy when an object reaches ground falling from a certainheight in the sky. Assume there is no obstacle between the ground and the location that the objectstarts in sky.The program should prompt users for the distance in feet from its position in the sky to the ground,and the mass of the object in pounds. Note that 1 ft = 0.3048 m (see http://www.meters-tofeet.com/feet-to-meters.php).1 pound = (1 / 2.2046) Kilograms = 0.453592 Kilograms (seehttp://www.metric-conversions.org/weight/kilograms-to-pounds.htm)User interface specifications: Inputo The program prompts for the two inputs, making sure their unit is clear to users. The twoinputs must be in the order of distance and mass. (Please read the problem descriptionabove.) Outputo Display the result, descriptively and friendlyo Make sure to display units for all numbers as appropriateCode specifications:

 The first comment line contains the name of the script file you submitted for grade. The header comment lines at the top of the file contain a brief description of the program. Thedescription should be one or 2 lines long describing the purpose of the program. Partition the task into smaller subtasks and implement each subtask with function(s). Eachfunction must have comment lines describing its functionality, inputs, and outputs, asapplicable. Your program must have a “main” function to aggregate the decomposed subtasks as shown inthe loan example in class. You also have to include comment lines in your “main” function todescribe the logic or flow of your solution to the whole problem. Finally, don’t forget to use the following idiom to call your “main” function within yourprogram.if __name__ == "__main__": main() Use descriptive variable names and function names.Testing: Develop at least 2 test cases, calculate the correct results by hand, and then confirm that yourprogram gives the same results. You do not need to submit your test cases.

Related Questions in computer science category


The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.