about | help | code help+videos | done | prefs |
Write a method that returns the maximum number of hours you should spend rock climbing today. The amount of time you spend rock climbing depends on several things. If you have been injured, you should climb a maximum of one hour, no matter what. Otherwise, you could climb up to one hour plus the number of days since you last climbed, but not to exceed 6 hours. However, if your pain level is low (below a 4), you can climb one extra hour. If you pain level is very high (above a 7), you can climb one less hours. Look at the test data for examples. feb13_2020_APP1SLHL_rockClimbing(5, 3, false) → 7 feb13_2020_APP1SLHL_rockClimbing(5, 2, false) → 7 feb13_2020_APP1SLHL_rockClimbing(14, 9, false) → 5 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy