ALGORITHMS
&
PROGRAMS
Here starts
the lesson!
Observe this picture
closely
See – Think -
Wonder
● What do you see?
● What do you think about it?
● What questions arise in your
minds related to this image?
● Do you like working in teams
● What are the best things
about working in teams?
Programmers
● Work very hard
● To produce results quickly and make error free
programs, they:
● Reuse code
● Adapt working programs to new uses
● Work in teams and share program ideas
01
INTRODUCTI
ON
Let’s watch this video
Video
An algorithm is a
plan to solve a
problem. It sets
out the steps to
solve the problem,
in order.
—Someone
Famous
Let us think of
a simple ● Step 1: Take a pan
problem: ● Step 2: Add water
Making Maggi ●
●
Step 3: Put the pan on gas
Step 4: Switch on the gas
● Step 5: Add Maggi packet
and sachet
● Step 6: Let the Maggi cook
for 3 – 4 minutes
● Step 7: Take off the gas
● Step 8: Put Maggi on plate
and serve
When you plan and make a
program, you must know:
What is the program requirement?
e.g. Making 2 packets of Maggi
Start Simple
e.g. Making a packet of Maggi
Plan the variables
e.g. Gas, burner, pan, water, Maggi, ladle
Create an algorithm
Create a program
How about
the problem
of adding two
numbers ● Step 1: Input a number A
● Step 2: Input a number B
● Step 3: Sum = A + B
● Step 4: Output Sum
● Step 5: End
Now you Checking if a
try! number is even or
Subtracting 2 odd.
numbers Comparing two
numbers and
Drawing a square telling which is
larger
Directions to your
class from the lab Riding a cycle
Where are
algorithms ● Navigation apps like Google
used? Maps use algorithms to find
the shortest or fastest route
from one place to another
● Search engines like Google
use algorithms to rank web
pages based on relevance.
● Platforms like Facebook, and
Instagram use algorithms to
personalize users' feeds.
Have you
heard of
algorithmic
journalism?
Requirement
A simple Calculate a total by
Plan adding 10 numbers
on input by the user
Inputs
10 numbers in a
sequence
Process
Addition
Output
Total / Sum
Extra
Challenge
Adapt the program so
that it repeats until
total is greater than
50
Exit Ticket
One thing I One thing One thing Something I still
understood well that I partially didn’t understand
understood
THANKS
Have a beautiful day!