In: Computer Science
i could use the flowchart and pseudocode solutions for the following:
1. 1. Draw a structured flowchart describing the steps you would take to bake pancakes in a pan. Include at least one decision.
2. 2. Create the pseudocode to go along with the flowchart created in question above.
2.from my_kitchen import *
# Ingredients:
flour = Flour('cups', 2.5)
baking_soda = BakingSoda('tsp', 1)
sugar = Sugar('cups', 1)
butter = Butter('sticks', 2)
eggs = Eggs(1)
# bonus ingredients
salt = Salt('tsp', 0.25)
margarine = margarine('tsp', 1)
#Step0:write checklist
list=Checklist()
check_list.check(Flour)
check_list.check(Sugar)
check_list.check(Butter)
check_list.check(eggs)
check_list.check(BakingSoda)
check_list.check.complete()
# Step 1: Preheat your pan
pan = Pan()
pan.heat(350, degrees='F')
# Step 2: Combine dry ingredients
dry_ingredients = Bowl()
dry_ingredients.add(flour)
dry_ingredients.add(baking_soda)
dry_ingredients.add(salt)
dry_ingredients.mix()
# Step 3: Combine wet ingredients
wet_ingredients = Bowl()
wet_ingredients.add(sugar)
wet_ingredients.add(butter)
# This doesn't add the egg shell
wet_ingredients.add(egg)
wet_ingredients.add(vanilla)
wet_ingredients.mix()
# Step 4: Mix your dry ingredients into your wet
ingredients
# We're doing this gradually to avoid an overflow error
while not dry_ingredients.is_empty():
wet_ingredients.add(dry_ingredients.part('cups', 0.5))
wet_ingredients.mix()
# Step 5 and 6 are a loop
for i in range(5):
spread_batter = Spread_Batter()
# Step 5: spread batter into the pan
for j in range(10):
pancake = spread_pancake_batter(wet_ingredients, size='1/4
cup')
spread_batter(pancake)
# Step 6: cook
pan.cook(spread_batter, 10)
# Wait for pancakes to cook 5 minutes before
# turning it on other side
wait(300)
spread_batter.empty()
#step 7:spread butter/margarine and sugar on pancake
spread_toppings=Pancake()
spread_toppings.add(Sugar)
spread_toppings.add(butter/margarine)
spread_toppings.spread()
Do let me know if you have any concerns or doubts.