Question: 1 . Define your golf class. a . Use the keyword class to define a class named golf b . Initialize a class variable named

1. Define your golf class. a. Use the keyword "class" to define a class named golf b. Initialize a class variable named results to hold the string that states whether the score is at, under, or over par. Hint: Initialize with a space. c. Define the constructor method to accept variables for hole, score, and par. Initialize hole and par Hint: Use self as an argument like self.hole = hole d. Define a method to evaluate and display the score. Use an IF statement to check the score against par. Set the results accordingly. Display the results for the given score and par value. Include the par value in the display score > par is "Over Par" score

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 Programming Questions!