CMT1000: Introduction to Programming. Ed Currie Lecture 2A: Pizza. Pizza making algorithm. Often when devising an algorithm, we will first express it using instructions at a high level of abstraction, that is, in quite general terms, without great detail.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Lecture 2A: Pizza
Four smaller problems to solve;
Not sufficiently detailed yet to enable us to make the pizza
..is asking the cook to execute another algorithm, the one on page 15 for making a pizza base.
...but it is often hard to be precise when using English to describe something accurately.
“The woman made the robot fast”
- Heat the oil in a frying pan
- Add the onion, garlic and chillies and fry for 5 minutes
- Put oil in pan
- Light gas
- Place small piece of onion in pan
- WHILE onion doesn’t sizzle
Wait 30 seconds
- Add the onion
- Add the garlic
- IF eater likes hot pizza
Add the chillies
- Fry for 5 minutes
IF eater likes very brown onions
Fry for 10 minutes
Fry for 5 minutes