37 lines
690 B
Markdown
37 lines
690 B
Markdown
# Banana Cake
|
|
## Instructions
|
|
|
|
1. Assume an action set of {add \<ingredient>, stir, bake, cool}. Draw a flowchart, using the paradigm discussed in class, to show the process of baking a banana cake. Use Google to find a typical list of ingredients.
|
|
2. Represent the flowchart from problem 1 as pseudocode.
|
|
|
|
## Diagram
|
|
```d2
|
|
vars: {
|
|
d2-config: {
|
|
dark-theme-id: 200
|
|
}
|
|
}
|
|
|
|
|
|
begin: {
|
|
shape: oval
|
|
near: top-left
|
|
}
|
|
end: {
|
|
shape: oval
|
|
near: bottom-right
|
|
}
|
|
|
|
begin -> add 3c flour\
|
|
-> add 1 1/2 tsp baking soda\
|
|
-> add 1/2 tsp cinnamon\
|
|
-> add 1/2 tsp salt\
|
|
stir: stir
|
|
-> stir\
|
|
-> add 3 mashed bananas\
|
|
-> add 1 tsp lemon juice\
|
|
-> stir\
|
|
-> add 3 eggs\
|
|
-> add 2tsp vanilla extract\
|
|
-> end
|
|
``` |