Question: Please answer in Python! This assignment is the extended version of the Lab#02 assignment. In Lab#02, we implemented a logic to calculate golf scores based
Please answer in Python!
This assignment is the extended version of the Lab#02 assignment. In Lab#02, we implemented a logic to calculate golf scores based on two identifiers a hole's par and the number of strokes. You had to run a couple of times to get relevant results. In this Lab#03, modify your logic using a user-defined function and while loop. Inside the while loop, you will get two values from the keyboard input, then call your Function with two arguments. The Function you have defined gets two Arguments, then inside of the Function, do the same thing as you did in Lab#02, but instead of printing out the result in the Function, you should return the result. (Please use your own identifier and function names) The control goes back to your while loop, then prints the result and increase the counter to control the number of iteration. Output Iteration: 0 How many strokes? 3 Par of the course? 3 Two arguments are passed to the Function Function returning the result You made par
Iteration: 1 How many strokes? 2 Par of the course? 4 Two arguments are passed to the Function Function returning the result Eagle
Iteration: 3 How many strokes? 3 Par of the course? 2 Two arguments are passed to the Function Function returning the result Error
Iteration: 4 How many strokes? 3 Par of the course? 3 Two arguments are passed to the Function Function returning the result You made par Process finished with exit code 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
