Want to create interactive content? It’s easy in Genially!
TDIII - Algorithm tools
jorge.as92
Created on August 31, 2020
Start designing with a free template
Discover more than 1500 professional designs like these:
Transcript
Algorithms: creation and representation
Digital Technologies III
Representing algorithms
Pseudocode
It consists of a series of ordered, numbered commands. They must be clear, and use the correct terms and symbols used in programming.
3 ways... Remember them?
Flowcharts
Programming code
A visual representationof the steps. It uses specific symbols to represent different commands.
Computer instructions written in a programming language.
Start
- What information does my algorithm need to solve this problem?
- What result or answer does my algorithm need to give?
- What do I need to do with that information to get that result or answer?
Creating an algorithm
+ - = * / ^
sum
assignment
multiplication
subtraction
raise topower
division
Operators
for mathematical expressions
> < >= <= !=
grater than or equal
less than
greater than
less than or equal
not equal
START: It orders the computer to start. INPUT: Used for receiving data into a variable. OUTPUT: It is used to display information (the result of the algorithm or a message) END: The last statement; it tells the computer to end the algorithm. IF - ELSE IF : Used for conditional statements (more on that later...)
Pseudocode Keywords
Example: an algorithm that asks for your name and then greets you... 1. START 2. OUTPUT "What's your name?"3. INPUT name 4. OUTPUT "Hello, " , name 5. END
Flowcharts
They represent the in an algorithm.
flow of data
They help us to...
- Organize our thoughts and the process
- Show an algorithm in a visual way.
- Find patterns and insights about the desired outcome
True
False
True or False?
1 > 5.5 -4 -2 < 0.5 * -2 5+2 >= 9-2 2^2 <= 6 4 / 2 > 0^12 10^2 >= 15 25 != 5^3
11 >= 5 -13 <= 10 -5 >= 5 2 <= 6 ^2 10 / 2 <= 0
Flowcharts
Source: https://www.youtube.com/watch?v=SWRDqTx8d4k
Flowcharts
Source: https://www.youtube.com/watch?v=SWRDqTx8d4k
Flowcharts
Source: https://www.youtube.com/watch?v=SWRDqTx8d4k
Flowcharts
Source: https://www.youtube.com/watch?v=SWRDqTx8d4k
Flowcharts
Source: https://www.youtube.com/watch?v=SWRDqTx8d4k