Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Calculator with Sunshine Toast.
- This recipe creates a simple 4 function calculator, that gets a number from the user, an operator, and another number; and returns a properly calculated result. By Kyle Korrigan and Adam Goldberg.
- Ingredients.
- soy beans
- water
- lima beans
- 42 g paprika
- 47 g salt
- 43 g pepper
- Method.
- Take soy beans from refrigerator.
- Take water from refrigerator.
- Take lima beans from refrigerator.
- //Handle input
- Put paprika into mixing bowl.
- Remove water from mixing bowl.
- //puts paprika (ascii value of *) into the bowl, and subtracts water from it; storing result
- Put salt into mixing bowl.
- Remove water from mixing bowl.
- //puts salt (ascii value of /) into the bowl, and subtracts water from it; storing result
- Put pepper into mixing bowl.
- Remove water from mixing bowl.
- //puts pepper (ascii value of +) into the bowl, and subtracts water from it; storing result
- //mixing bowl looks like: [pepper, salt, paprika]
- Put lima beans into mixing bowl.
- Put soy beans into mixing bowl.
- //mixing bowl looks like: [soy beans, lima beans, pepper, salt, paprika]
- Serve with Sunshine Toast.
- //pass a copy of the mixing bowl to the Sunshine Toast to do computation
- Fold lima beans into the mixing bowl.
- //remove answer from the mixing bowl
- Put lima beans into 2nd mixing bowl.
- //transfer answer to separate mixing bowl so we can move it to a baking dish for output
- Pour contents of 2nd mixing bowl into the baking dish.
- Serves 1.
- Sunshine Toast.
- This recipe handles the calculations for the main recipe.
- Ingredients.
- soy beans
- lima beans
- eggs
- butter
- toast
- //mixing bowl passed from "Calculator with Sunshine Toast" looks like: [soy beans, lima beans, pepper, salt, paprika]
- Method.
- Fold soy beans into the mixing bowl.
- Fold lima beans into the mixing bowl.
- Fold eggs into the mixing bowl.
- Fold butter into the mixing bowl.
- Fold toast into the mixing bowl.
- //pull from read only mixing bowl and store in appropriate values
- Put lima beans into the mixing bowl.
- //put the number to be computed into the bowl
- //mixing bowl looks like: [lima beans]
- Beat eggs.
- Melt butter.
- Whisk toast.
- Remove soy beans from the mixing bowl.
- //do subtraction, leave the result in the mixing bowl
- Refrigerate.
- Whisk toast until Whisked.
- Add soy beans to the mixing bowl.
- //do addition, leave the result in the mixing bowl
- Refrigerate.
- Melt butter until melted.
- Divide soy beans into the mixing bowl.
- //do division, leave the result in the mixing bowl
- Refrigerate.
- Beat eggs until beaten.
- Combine soy beans into the mixing bowl.
- //do multiplication, leave the result in the mixing bowl
- Refrigerate.
Add Comment
Please, Sign In to add comment