Write an algorithm to prepare coffee.
Answers
Explanation:
Coffee Algorithm
Input: Ingredients
Output: A cup of coffee
Steps:
Pour drinking water into electric kettle
Plug electric kettle and wait for it to boil
While waiting, prepare coffee cup
Add instant coffee powder into cup
Check boiling water
If water is boiled, unplug kettle and pour water into cup
If water is not boiled, press the “on” switch to continue and wait until boiled
Refer back to step 6
Stir coffee mix
Drink!
Assumptions:
I have a cup/glass to put my coffee in
I have a kettle
I can drink coffee
Answer:
1)Pour drinking water into electric kettle.
2) Plug electric kettle and wait for it to boil.
3) While waiting, prepare coffee cup.
4) Add instant coffee powder into cup.
5) Check boiling water.
6) If water is boiled, unplug kettle and pour water into cup.
7) If water is not boiled, press the “on” switch to continue and wait until boiled.