Question: [ golf - helper.py ] You have been contracted by a golf training company in need of a new golf club recommendation app for their

[golf-helper.py]
You have been contracted by a golf training company in need of a new golf club recommendation app for their clients.
Your new client is looking for an application where a user enters some information about their current golfing situation and the app replies with what club the person should use. They want to start simple first. The application should ask the user, in this order, if...
they have hit the ball on the green (answer should be `y` or `n`)
how far they are from the hole
Based on the user input, the application should respond according to these parameters:
If the ball is on the green, then the app should recommend using the 'Putter' club.
If the distance is 200 yards or more, it should recommend the 'Driver'.
Between 140 and 200 yards it should recommend the '5-Iron'.
Between 100 and 140 yards, it should recommend the '9-Iron'.
For any other distance, it should recommend the 'Pitching Wedge'.

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!