Draw a flowchart that shows the steps of making a peanut butter and jelly sandwich as an algorithm. Include steps like getting bread, spreading peanut butter, spreading jelly, and putting the slices together.
7 minutes
Hint 1
Hint 2
Hint 3
Hint 4
Grading Criteria
Start and End symbols (ovals) present
All main steps included: Get Bread, Spread Peanut Butter, Spread Jelly, Put Slices Together
This flowchart starts with the Start symbol (oval). Then it shows the first step: Get Bread (rectangle). Next, it moves to Spread Peanut Butter, then Spread Jelly, each as rectangles representing actions. After that, it shows Put Slices Together. Finally, the flow ends at the End symbol (oval). Arrows connect each step in order, showing the sequence clearly.
This is like a recipe: a list of clear steps to follow to make a sandwich. Each step is simple and must be done in order.
Variations - 2 Challenges
[beginner] Draw a flowchart for making a cup of tea as an algorithm, including boiling water, adding tea leaves, steeping, and pouring tea.
[intermediate] Draw a flowchart for making a peanut butter and jelly sandwich but include a decision step to check if the bread is fresh. If not fresh, get new bread before continuing.
Practice
(1/5)
1. What is the best way to describe an algorithm using a recipe analogy?
easy
A. A list of clear steps to follow to get the same result every time
B. A random set of ideas to try when cooking
C. A secret ingredient that changes the dish
D. A tool used only by expert chefs
Solution
Step 1: Understand what an algorithm is
An algorithm is a set of clear, step-by-step instructions to solve a problem.
Step 2: Compare to a recipe
A recipe is also a set of clear steps to make a dish, ensuring the same result each time.
Final Answer:
A list of clear steps to follow to get the same result every time -> Option A
Quick Check:
Algorithm = Clear steps like a recipe [OK]
Hint: Think of algorithms as step-by-step recipes [OK]
Common Mistakes:
Thinking algorithms are random or secret
Confusing tools with instructions
Believing only experts use algorithms
2. Which of the following shows the correct way to write an algorithm step in a recipe style?
easy
A. Skip steps if you feel like it
B. Mix all ingredients randomly and hope for the best
C. Cook the dish until it's done, no time specified
D. Add 2 cups of flour, then stir for 5 minutes
Solution
Step 1: Identify clear and precise instructions
Good algorithm steps must be clear and exact, like 'Add 2 cups of flour, then stir for 5 minutes.'
Step 2: Eliminate vague or random instructions
Options with randomness or skipping steps are not correct algorithms.
Final Answer:
Add 2 cups of flour, then stir for 5 minutes -> Option D
Quick Check:
Clear, exact steps = Correct algorithm step [OK]
Hint: Look for clear, exact instructions in options [OK]
Common Mistakes:
Choosing vague or random instructions
Ignoring the importance of order
Thinking skipping steps is allowed
3. Consider this simple algorithm for making tea:
1. Boil water. 2. Add tea leaves. 3. Wait 5 minutes. 4. Pour tea into cup. 5. Add sugar if desired.
What is the output if you follow these steps exactly?
medium
A. A cup of tea ready to drink
B. A cup of cold water
C. An empty cup
D. A cup of coffee
Solution
Step 1: Follow each step in order
Boiling water, adding tea leaves, waiting, pouring, and adding sugar results in tea.
Step 2: Understand the final result
The final output is a cup of tea ready to drink, not water or coffee.
Final Answer:
A cup of tea ready to drink -> Option A
Quick Check:
Following recipe steps = Tea made [OK]
Hint: Follow steps in order to predict output [OK]
Common Mistakes:
Ignoring the waiting step
Confusing tea with coffee
Assuming no output is produced
4. This algorithm is meant to make a sandwich:
1. Take two slices of bread. 2. Spread peanut butter on one slice. 3. Spread jelly on the other slice. 4. Put the slices together. 5. Eat the sandwich.
Which step has a problem if you want to make a sandwich without jelly?
medium
A. Step 2: Spread peanut butter on one slice
B. Step 3: Spread jelly on the other slice
C. Step 4: Put the slices together
D. Step 5: Eat the sandwich
Solution
Step 1: Identify the unwanted ingredient
The problem is spreading jelly if you want no jelly.
Step 2: Find the step that adds jelly
Step 3 spreads jelly, so it must be changed or skipped.
Final Answer:
Step 3: Spread jelly on the other slice -> Option B
Quick Check:
Remove unwanted steps to fix algorithm [OK]
Hint: Find steps adding unwanted items [OK]
Common Mistakes:
Choosing steps that are correct
Ignoring the jelly requirement
Thinking eating step is wrong
5. You want to create an algorithm to prepare a fruit salad. The steps are: 1. Wash all fruits. 2. Peel fruits that need peeling. 3. Cut fruits into pieces. 4. Mix all pieces in a bowl. 5. Add lemon juice.
How would you modify this algorithm to handle a new fruit that does not need peeling?
hard
A. Remove washing step
B. Always peel all fruits regardless of type
C. Skip peeling step for fruits that don't need it
D. Add sugar instead of lemon juice
Solution
Step 1: Understand the peeling requirement
Some fruits do not need peeling, so peeling must be conditional.
Step 2: Modify the algorithm to skip peeling when not needed
Only peel fruits that require it, skip for others.
Final Answer:
Skip peeling step for fruits that don't need it -> Option C
Quick Check:
Use conditions to handle exceptions in algorithms [OK]
Hint: Use conditions to skip unnecessary steps [OK]
Common Mistakes:
Peeling all fruits blindly
Removing important steps like washing
Changing unrelated steps
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.