Programming I
Programming I
Science O.L.
(New Syllabus)
01
Programming pt.1
What is programming?
Programming is an important skill in today's
digital age
4 General phases
Design Testing
Analysis Implementation
Design
It is phase that helps making implementation
easier.
By following same programming concepts , but without
dealing with complicated syntax (code grammar)
Structure
Keyword Content
OUTPUT
Screen
Keyword used to print something on screen
My name is Mohamed
Message Memory
Later
Output Message
Non-changing statement that you want it to be printed as it is. Code
Programming is Fun
Code
Screen
Code
INPUT String
Screen
Keyword used to take entry from user and store it
in computer
INPUT is always related to DECLARE ……………I
Code
OUTPUT String
Screen
Keyword used to print something on screen
Message Memory
Output Memory
To show data that stored in specific memory. Code
Code
Myname
Operations String
Screen
Computers are capable of doing any calculation.
be stored.
Code
Numbers
Integer
Result 20 + 10
NUM1 NUM2
20 10
Integer Integer
Memory
Code
Quick question
Design an algorithm that inputs 4 numbers and Screen
calculate its sum
Code
Quick question
Design an algorithm that inputs from the user the length of two
sides of a rectangle and the program calculates and displays Screen
both the perimeter and area of that rectangle.
-Perimeter of Rectangle = (Length+Width) * 2
-Area of Rectangle = Length * Width
Code
Quick question
Design an algorithm that inputs from the user
Screen
height and base lengths of a triangle and calculate
its area.
Area= ½ x Base x height
Code
Flowchart
It is defined by specific shapes.
Non-declarative language.
It has a start and end point that you have to
mention.
It all about writing pseudocode line but in shapes.
Flowchart
Quick question
Create a program that take a name and a number
from the user which represent your age and show
them in appropriate way
-( Name is.... age is....)
Quick question
Create program that take two numbers as an
input and print their sum.
Quick question
Design an algorithm that inputs 4 numbers and
calculate its sum
Quick question
Design an algorithm that inputs from the user the length of two
sides of a rectangle and the program calculates and displays
both the perimeter and area of that rectangle.
-Perimeter of Rectangle = (Length+Width) * 2
-Area of Rectangle = Length * Width
Quick question
Design an algorithm that inputs from the user
height and base lengths of a triangle and calculate
its area.
Area= ½ x Base x height
Graded test
Create program that take two numbers as an
Screen
input and print their sum and their product.
Pseudocode & flowchart
Code
Next Session
Programming pt.2
HW
THANKS