Week 1 - Introduction To Programming
Week 1 - Introduction To Programming
COMPUTER
PROGRAMMING 1
Topic 1
introduction to
programming
3
What is
programming?
4
Programming Concept
5
Programming Concept
6
WHAT IS THE MAIN PURPOSE
OF PROGRAMMING?
.
- the main objective of programming is to solve a problem.
7
Programming Programming and its purpose
Humans cannot solve a lot of problems in just a matter of seconds... but a computer can.
It has long been known that computers can improve our daily lives. From calculating large
amounts of data, from storing and retrieving information in a secure place, and in
communicating with our loved ones in a faraway place.
But all of that capabilities, a computer cannot do by itself. A computer is just a tool that can
be used to implement a plan for solving a problem.
It needed the help and guidance of a computer program.
8
Programming Programming and its purpose
Computer program – is a set of instructions for a computer. These instructions describe the
steps that the computer must follow to implement a plan.
A detailed plan for solving a problem is called an algorithm. It is a process or set of rules to
be followed in calculations or other problem-solving operations, especially by a computer.
9
Programming Algorithm vs Computer Program
Problem Statement:
Write a solution on how to find the average grades of a class of 10 students.
Algorithm Computer Program
10
Programming Algorithm Development Process
The figure below represents the “Pick and Plant” problem. One must apply the
algorithm development process to fully understand the concept.
12
Programming Algorithm Development Process
A problem statement is a short, clear
Step 1: Problem Statement explanation of the issue
– A kangaroo starts at (0, 0) facing East with no flowers in its pouch. There is a flower at location (0, 3).
– Write an algorithm that directs the kangaroo to pick the flower and plant it at location (2, 3).
– After planting the flower, the kangaroo should hop one space East and stop.
13
Programming Algorithm Development Process
14
Programming Algorithm Development Process
15
Programming Algorithm Development Process
16
Programming Algorithm Development Process
17
Programming Input, Process, Output
PROCESS
INPUT OUTPUT
2, 3 Addition 5
18