Sasquatch, like any creature, requires water to survive, but the waters of the forest are not always safe to drink. Legend has it that Sasquatch once fell ill after drinking from a stream with a high concentration of algae bloom. Since then, Sasquatch has learned to seek a balance between the purity of the water and the nourishment of minerals. With varying levels of algae bloom and mineral content, Sasquatch must tread carefully to avoid falling ill. Now, it's up to you to help Sasquatch determine if the water is safe to drink in this crucial water safety challenge!Â
Are you ready to embark on this critical quest and safeguard Sasquatch's health in the wilderness? Let's dive into the Doom of Sassy's Bloom Challenge and ensure its survival in the enchanted forest. Good luck!
Image generated by Copilot using Dall-E3.
Your task is to create a function called safeToDrink that takes in two parameters: the quantity of algae bloom (chlorophyll-a concentration) and the quantity of special minerals. The function should determine whether the water is safe to drink based on the ratio of algae bloom to minerals.
Here's the ratio for safety:
Safe Range: The ratio of algae bloom to minerals should be within 1:2 and 2:1.
Unsafe:
If the ratio is less than 1:2, indicating excessive algae bloom, Sasquatch may experience vomiting.
If the ratio is greater than 2:1, indicating excessive minerals, Sasquatch may experience diarrhea.
Your function should return "Safe to drink" if the ratio falls within the safe range, "Unsafe - Vomiting" if there's excessive algae bloom, and "Unsafe - Diarrhea" if there are excessive minerals.
algea bloom, minerals
5, 20 --> Unsafe - Diarrhea
20, 5 --> Unsafe - Vomiting
10, 20 --> Safe
20, 10 --> Safe
8, 8 --> Safe