3
Your Challenge:
For a golf Course Of Inputted 'n' length to hole where:
'n' is a whole number and a multiple of 5 between 150 and 500
and
1 integer in code = 1 metre
You must calculate the least amount of swings it can be completed in using a combination of clubs and ranges.
Here is a visual representation of what this calculator will be working out (in colours): Disregarding nature and swing paths, you are to find the fewest number of swings.
Firstly, you must have a 'Men Or Women' Option as shown in the pseudocode below:
INPUT <- "Men Or Women"
Each club option has Two Values. These are the ranges of the distance in which the club's shot may fall. This calculator assumes the player is a pro and can choose how far the shot goes in the range. ~It can only be in multiples of 5~
Higher towards the range of one club overrules Lower towards the range of another.
Club Men Women
Driver 200-260 150-200
3-wood 180-235 125-180
5-wood 170-210 105-170
2-iron 170-210 105-170
3-iron 160-200 100-160
4-iron 150-185 90-150
5-iron 140-170 80-140
6-iron 130-160 70-130
7-iron 120-150 65-120
8-iron 110-140 60-110
9-iron 95-130 55-95
PW 80-120 50-80
SW 60-100 40-60
putter 10-30 10-20
The input must ask for course length and gender separately, and then calculate and then display the output, which must start with displaying gender, and then look like a list (in order of the clubs to be used and the distance hit.
The final Value Must Be A Putter Distance implying it has
EG:
(Gender):
(n)m Course
Driver (x)m
4-iron (x)m
3-iron (x)m
putter (x)m
Please Be Aware This is just an example as it could include any combination of clubs.
Finally:
If there is more than one answer, then all must be displayed with a title above exclaiming the answer like so:
(Gender):
(n)m Course
Run 1:
Driver (x)m
4-iron (x)m
3-iron (x)m
putter (x)m
Run 2:
Driver (x)m
4-iron (x)m
3-iron (x)m
putter (x)m
and so on...
Please be aware, except at weekends, I am unable to check comments between 0800 and 1600 GMT. If you leave one, I will get back to you as soon as I can – Monster – 9 years ago