Compare commits
10 Commits
55007bf97f
...
9d284449dd
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9d284449dd | ||
![]() |
a3e58cda87 | ||
![]() |
e5ae89b884 | ||
![]() |
99b48aa5d5 | ||
![]() |
e891618556 | ||
![]() |
18005358d8 | ||
![]() |
c0b547767d | ||
![]() |
b8be194f0a | ||
![]() |
22fdfdff3e | ||
![]() |
e68f048afb |
@ -4,12 +4,11 @@
|
|||||||
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.
|
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.
|
2. Represent the flowchart from problem 1 as pseudocode.
|
||||||
|
|
||||||
## Diagram
|
## Flowchart
|
||||||
```d2
|
```d2
|
||||||
vars: {
|
vars: {
|
||||||
d2-config: {
|
d2-config: {
|
||||||
dark-theme-id: 200
|
dark-theme-id: 200
|
||||||
layout-engine: elk
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
grid-columns: 3
|
grid-columns: 3
|
||||||
@ -75,3 +74,46 @@ end: {
|
|||||||
|
|
||||||
4. Represent the flowchart from problem 3 as pseudocode.
|
4. Represent the flowchart from problem 3 as pseudocode.
|
||||||
|
|
||||||
|
%%
|
||||||
|
Assuming a step distance of 2.5 feet.
|
||||||
|
|
||||||
|
Shady path:
|
||||||
|
Turn to 270 degrees
|
||||||
|
Walk 112 steps
|
||||||
|
Turn to 225 degrees
|
||||||
|
Walk 124 steps
|
||||||
|
Turn to 270 degrees
|
||||||
|
Walk 361 steps
|
||||||
|
Turn to 0 degrees
|
||||||
|
Walk 176 steps
|
||||||
|
Turn to 270 degrees
|
||||||
|
Walk 62 steps
|
||||||
|
|
||||||
|
|
||||||
|
Sunny path:
|
||||||
|
Turn to 270 degrees
|
||||||
|
Walk 73 steps
|
||||||
|
Turn to 0 degrees
|
||||||
|
Walk 94 steps
|
||||||
|
Turn to 275 degrees
|
||||||
|
Walk 467 steps
|
||||||
|
Turn to 180 degrees
|
||||||
|
Walk 86 steps
|
||||||
|
Turn to 270 degrees
|
||||||
|
Walk 80 steps
|
||||||
|
|
||||||
|
%%
|
||||||
|
|
||||||
|
## Flowchart
|
||||||
|
```d2
|
||||||
|
vars: {
|
||||||
|
d2-config: {
|
||||||
|
dark-theme-id: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
classes: {
|
||||||
|
}
|
||||||
|
beginning: {shape: oval}
|
||||||
|
|
||||||
|
end: {shape: oval}
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user