- Correctly apply DeMorgan's theorem to the case of OR.
Your Task, Your Challenge
Write your code so that the robot lets the cyber dog out at the right time.
Use DeMorgan’s theorem so that the robot only lets the cyber dog out if no raindrops are falling. If it begins to sprinkle, the dog will rust and will no longer even be able to go out.
There are 2 tests you can use to do this:
- rain() checks whether it's raining or not;
- watering() checks whether the watering system works or not.
It's your turn :O)
You must ensure that for every possible case the robot decides correctly whether or not to let the dog out.