Lesson 2 - Introduction To Programming
Lesson 2 - Introduction To Programming
with Python
Introduction to Programming
Learning Objectives
Problem Solution
Types of Programming Languages
Object-Oriented
Programming Language
Scripting Programming
Functional Programming
Language
Language
Logical
Procedural Programming
Programming Language
Language
Requirements for Programming Languages
Should be well-
structured and
documented
Algorithm, Pseudocode, and Flowchart
Algorithm
Pseudocode is a way of writing a program description that includes simple descriptions but does
not have precise syntax.
Example:
Begin
Set sum = 0;
Read: number 1, number 2;
sum = number 1 + number 2;
Print sum;
End
Flowchart
Start
Input
Process
Output
End
Pseudocode vs. Flowchart
Pseudocode Flowchart
A compiler is a special program that processes statements written in a programming language and
converts them into machine language.
Compiler
#include<stdio.h RESULT
Void main() 11100000
printf(“First”) 110000
Getch()
11110000
An interpreter is a program that reads and executes each instruction of the code. This includes source
code, precompiled code, and scripts.
first.p
y
Interpreter
print(“First”)
RESULT
Compiler vs. Interpreter
Compiler Interpreter
a. Pseudocode
b. Compiler
c. Algorithm
d. Flowchart
Knowledge
Check
Which of the following is a detailed step-by-step method for solving a problem?
1
a. Pseudocode
b. Compiler
c. Algorithm
d. Flowchart
a. Pseudocode
b. Compiler
c. Interpreter
d. Flowchart
Knowledge
Check
Which of the following represents an algorithm using a diagram?
2
a. Pseudocode
b. Compiler
c. Interpreter
d. Flowchart
a. Algorithm
b. Interpreter
c. Compiler
d. Pseudocode
Knowledge
Check
Which of the following options takes a single instruction as input?
3
a. Algorithm
b. Interpreter
c. Compiler
d. Pseudocode