Beta
Scuba Diving Safety: Oxygen Toxicity
13vlbee
Loading description...
Physics
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Hi Voile,
There is no reason the chart in the Kata needs to go beyond 1.4 bar which is the max safe range for normal recreational diving. I guess I included the wider range because the idea is that the chart is an external source of information the programme needs to reference, and it is published with wider ranges. So in a real life programming scenario, if you were writing code for a dive computer, you would need to limit the range of the input data to suit your programe.
However, as it's confusing I can remove this easily and will do so now. (In writing this Kata I realized how complicated diving physics and safety is!)
Sure :)
(Also you should reply on the comments by clicking the
Reply
button under the comment, so that everything is gathered inside a single thread.)total fail there :)
The chart is reduced now to a .6 - 1.4 range.
If we're only ever allowing oxygen level to reach
1.35
before declaring it's unsafe, why the chart has values up to1.8
?Hi Voile - just fixed this. Thanks for spotting!
Sample tests says:
Test.assertEquals(diveSafe(120, 20, 32), 'MOD REACHED. Replan your dive.')
But description says:
"MAX OPERATING DEPTH REACHED. Replan your dive."
.