CEP824 - Unit 2 Algorithms
- Shuaiqi Hu
- Jan 24, 2022
- 1 min read
Define
An algorithm is a sequence of well-defined, precise steps for solving a problem.
Algorithmic Thinking
Algorithmic thinking refers to our ability solving problems in an effective way leading to an algorithm. Algorithmic thinking also includes the ability to understand that some problems cannot be solved by an algorithm. It involves
the ability to specify a problem precisely
the ability to create and describe an algorithm to solve the problem
the ability to answer “what if” questions about the algorithm
the ability to argue the correctness of an algorithm
the ability to find examples of inputs on which the algorithm fails to work as expected (if not a correct algorithm)
Practice
Record the EXACT instructions for making a peanut butter and jelly sandwich.This should be in a numbered ordered list and should be as precise as you can possibly make it.
Take 2 pieces of bread from the package;
Put into bread toasters for 2 minutes;
While waiting, take peanut butter and jelly from the fridge;
Put toasted bread onto plate;
Spread the peanut butter on one piece of bread;
Spread the jelly onto the other piece;
Put the two pieces of bread together, two sides with peanut butter/jelly facing together;
Now we have our peanut butter and jelly sandwich
Opmerkingen