### Present Remotely

Send the link below via email or IM

• Invited audience members will follow you as you navigate and present
• People invited to a presentation do not need a Prezi account
• This link expires 10 minutes after you close the presentation

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

# CG1.4 Algorithms and Programming

No description
by

## Kevin Mahon

on 19 March 2014

Report abuse

#### Transcript of CG1.4 Algorithms and Programming

Algorithms in Programming
Introduction to Algorithms
Lesson Objectives
What is an Algorithm?
What do you think these tasks have in common?
Even if you drew the kite, the instructions were still too vague.

Task 1 - Drawing an Algorithm
What did you draw?
You should have drawn a Kite!!
CG1.4 Algorithms and Programming
Understand what an Algorithm is
Complete the Drawing Activity
Complete an Algorithm quiz
They all use instructions and have explicit steps that must be followed correctly
Cooking recipe
Knitting a pattern
Assembling furniture from Ikea
Using a Programming Language to find Ages of Students?
Are all the drawings different?
2. Draw another diagonal line connected to the top of the first one
3. Draw a straight line from the point where the diagonal lines meet

4. Draw a horizontal line over the straight line

5. At the bottom of the straight line, draw a curvy line

6. Draw a diagonal line from the bottom of the first
diagonal to the straight line

1. Draw a diagonal line

7. Draw a diagonal line from the bottom of the second
diagonal to the straight line

What was wrong with the instructions?
Before implementing an algorithm in code, it needs to be designed and be describable.
Pseudo code or flow charts can describe algorithms
Pseudo Code
input the Celsius Temperature

if Celsius is less or equal to zero

print "It's Freezing!"

else

print "It's Not Freezing!"

Code
cin tC;

if (tC <= 0)
{
cout << "Its Freezing!" ;
}

else
{
cout << "It's Not Freezing!";
}

Flow Charts
Start
Alarm
Rings
Get Up?
Climb Out
of Bed
End
Hit Snooze
Button
Delay
NO!
Yes
Set for 5 Min
Average 3 Times
Now get ready for the Quiz!
Go to the following Website -

Kahoot.it
A good Algorithm
Must be unambiguous
Must be correct
Must be at the right level of detail

Try to add more detail and rewrite the instructions.
Full transcript