Check Water Bottle Empty
This problem is based on a simple daily check. You look at how much water is left in a bottle and want to know whether it is already empty.
If the amount left is exactly 0, print EMPTY. If the amount is more than 0, print HAS WATER.
For example, if the bottle has 0 milliliters left, the answer is EMPTY. If it still has 250 milliliters, the answer is HAS WATER.
So the task is to check one number and return the correct bottle status.
Example Input & Output
There is still water left in the bottle.
Any amount above zero means the bottle is not empty.
No water left means the bottle is empty.
Algorithm Flow

Solution Approach
A simple way to solve this is to compare the amount left with zero.
First, read the amount of water left in the bottle. After that, check whether the value is exactly equal to 0.
If the value is 0, that means nothing is left, so print EMPTY.
If the value is greater than 0, the bottle still has water, so print HAS WATER.
This problem is just one quick equality check, so the logic stays short and clear.
Best Answers
Solutions Coming Soon
Verified best solutions for this Challenge are still being analyzed and will be available soon.
Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
