0
0
Intro to Computingfundamentals~20 mins

Algorithm as a recipe analogy in Intro to Computing - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Algorithm Recipe Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the steps in an algorithm recipe

Imagine you have a recipe to bake a cake. Which part of the recipe is like the 'algorithm' in computing?

AThe name of the cake written on the recipe
BThe list of ingredients needed for the cake
CThe picture of the finished cake on the recipe book
DThe step-by-step instructions to bake the cake
Attempts:
2 left
💡 Hint

Think about what tells you exactly what to do in order.

trace
intermediate
2:00remaining
Tracing an algorithm recipe for making tea

Follow the steps below to make tea. What is the final output?

1. Boil water
2. Put tea leaves in a cup
3. Pour boiled water into the cup
4. Let it steep for 3 minutes
5. Remove tea leaves
6. Add sugar if desired
7. Stir and serve
AA cup with tea leaves only
BA cup of tea ready to drink
CAn empty cup
DA cup of cold water
Attempts:
2 left
💡 Hint

Think about what the steps produce after following all instructions.

Comparison
advanced
2:00remaining
Comparing algorithms to recipes with different steps

Two recipes make the same sandwich but with different steps. Which statement best describes the difference in their algorithms?

AThey have the same algorithm because the sandwich is the same
BThey have no algorithms because recipes are not algorithms
CThey have different algorithms because the steps and order differ
DThey have identical algorithms because ingredients are the same
Attempts:
2 left
💡 Hint

Think about what makes an algorithm unique.

identification
advanced
2:00remaining
Identifying algorithm characteristics in a recipe

Which characteristic of an algorithm is shown by the recipe step: 'Add 2 cups of flour'?

AInput - the data given to the algorithm
BOutput - the result of the algorithm
CDecision - choosing between options
DLoop - repeating steps multiple times
Attempts:
2 left
💡 Hint

Think about what '2 cups of flour' represents in the recipe.

🚀 Application
expert
3:00remaining
Designing an algorithm as a recipe for brushing teeth

Which of the following is the best step-by-step algorithm (recipe) for brushing teeth?

A1. Wet toothbrush 2. Apply toothpaste 3. Brush teeth 4. Rinse mouth 5. Clean toothbrush
B1. Apply toothpaste 2. Brush teeth 3. Wet toothbrush 4. Rinse mouth 5. Clean toothbrush
C1. Brush teeth 2. Wet toothbrush 3. Apply toothpaste 4. Rinse mouth 5. Clean toothbrush
D1. Rinse mouth 2. Wet toothbrush 3. Apply toothpaste 4. Brush teeth 5. Clean toothbrush
Attempts:
2 left
💡 Hint

Think about the logical order of actions to brush teeth properly.