Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. ###Mini Golf Scores
  2.  
  3. ####Exercise
  4. Bob, Jimbo and Fish love mini golf. But, like all good golfers they enjoy the 19th hole the most. Every time they hand in their score cards none of the scores are ever totalled. Write a function called ```totalScores``` in JS that calculates their scores and 'console.logs' the total for the club house.
  5.  
  6. #####Bob
  7. > Hole 1 = 3
  8. > Hole 2 = 2
  9. > Hole 3 = 6
  10. > Hole 4 = 11
  11. > Hole 5 = 9
  12. > Hole 6 = 2
  13. > Hole 7 = 6
  14. > Hole 8 = 9
  15. > Hole 9 = 10
  16.  
  17. #####Jimbo
  18. > Hole 1 = 5
  19. > Hole 2 = 12
  20. > Hole 3 = 9
  21. > Hole 4 = 22
  22. > Hole 5 = 13
  23. > Hole 6 = 7
  24. > Hole 7 = 16
  25. > Hole 8 = 10
  26. > Hole 9 = 11
  27.  
  28. #####Fish
  29. > Hole 1 = 2
  30. > Hole 2 = 2
  31. > Hole 3 = 4
  32. > Hole 4 = 5
  33. > Hole 5 = 4
  34. > Hole 6 = 3
  35. > Hole 7 = 6
  36. > Hole 8 = 4
  37. > Hole 9 = 1
  38.  
  39. ####Extension
  40. Now work out each golfers round compared to the course par.
  41.  
  42. #####Par
  43. > Hole 1 = 3
  44. > Hole 2 = 4
  45. > Hole 3 = 5
  46. > Hole 4 = 5
  47. > Hole 5 = 3
  48. > Hole 6 = 3
  49. > Hole 7 = 4
  50. > Hole 8 = 3
  51. > Hole 9 = 5
  52.  
  53. ####Ninja Extension
  54. Fish loves a punt. Having placed a $1 bet on each stroke over par that Bob and Jimbo played per hole calculate his winnings.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement