Question

In: Computer Science

i could use the flowchart and pseudocode solutions for the following: 1.       1.  Draw a structured flowchart describing...

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.

Solutions

Expert Solution

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.


Related Solutions

Draw a structured flowchart or write pseudocode that describes the process of guessing a number between...
Draw a structured flowchart or write pseudocode that describes the process of guessing a number between 1 and 100. After each guess, the player is told that the guess is too high or too low. The process continues until the player guesses the correct number. Pick a number and have someone try to guess it by following your instructions. Submit the flowchart or pseudocode and the results of your test. Create a python program based on your flowchart or pseudocode....
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell...
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell phone customer. -List at least 10 separate modules that might be included. - For example, one module might calculate the charge for daytime phone minutes used. - -Make a working version of this program using Python. Need all of the above answered including the correct code for program using python
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart for each of the following problems: a) Obtain three numbers from the keyboard, compute their product and display the result. b) Obtain two numbers from the keyboard, and determine and display which (if either) is the smaller of the two numbers. c) Obtain a series of positive numbers from the keyboard, and determine and display their average (with 4 decimal points). Assume that the...
Draw a flowchart and pseudocode that accepts three numbers from a user and displays a message...
Draw a flowchart and pseudocode that accepts three numbers from a user and displays a message if the sum of any two numbers equals the third. Make a working version of this program in Python.
I needv pseudocode and a flowchart for the following java code public class AcmePay { public...
I needv pseudocode and a flowchart for the following java code public class AcmePay { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); int hours, shift, retirement = 0; do { System.out.print("Enter the number of hours worked (>0): "); hours = scanner.nextInt(); } while (hours <= 0); do { System.out.print("Enter shift [1 2 or 3]: "); shift = scanner.nextInt(); } while (shift < 1 || shift > 3); if (shift == 2 || shift ==...
All program should be in C Write its pseudocode and draw its flowchart) to prompt the...
All program should be in C Write its pseudocode and draw its flowchart) to prompt the user to input the variables to solve the following problem: X2 + X×Y/Z - W*V3 Note 1: You should ask the user to input 5 numbers to be able to do this calculation. Note 2: You can use multiplication instead of power if you do not want to use it (as we have not officially covered it). Write a program (compile and run), pseudocode,...
In this Java lab, you use the flowchart and pseudocode found in the figure below to...
In this Java lab, you use the flowchart and pseudocode found in the figure below to add code to a partially created Java program. When completed, college admissions officers should be able to use the Java program to determine whether to accept or reject a student, based on his or her test score and class rank. Declare the variables testScoreString and classRankString. Write the interactive input statements to retrieve: A student’s test score (testScoreString) A student's class rank (classRankString) Write...
1 Write structured pseudocode to show the following: If you are at home, get comfortable and...
1 Write structured pseudocode to show the following: If you are at home, get comfortable and take a nap while you are sleepy, otherwise do not take a nap. 2 Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee 3 Write structured pseudocode to indicate that you will keep drying your hair while it is still wet 4 Write structured pseudocode to show the following: when you are on...
[15 marks] Draw the flowchart of the following programming problem: You can draw the flowchart using...
[15 marks] Draw the flowchart of the following programming problem: You can draw the flowchart using a drawing tool, or draw the flowchart on a piece of paper, take a picture, insert it here or save it in the submission folder The program reads an unspecified number of integers until a zero is entered. While the program reads each number it counts the number of positive numbers and the number of negative numbers that have been entered and sum up...
Please I can get a flowchart and a pseudocode for this java code. Thank you //import...
Please I can get a flowchart and a pseudocode for this java code. Thank you //import the required classes import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class BirthdayReminder {       public static void main(String[] args) throws IOException {        // declare the required variables String sName = null; String names[] = new String[10]; String birthDates[] = new String[10]; int count = 0; boolean flag = false; // to read values from the console BufferedReader dataIn = new BufferedReader(new...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT