Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 41

hello!

Jomar “Joms” Llevado


Instructor
Introduction to
Programming
Objectives
 To understand the fundamentals of
programming
 To learn the techniques and process in
writing a program
 To write a simple program with a
programming language
Topic Outline
 Computer System basics
 Overview of Programming
 Algorithm, Flowchart & pseudocode
 Programming tools
 Programming syntax
 Write our first code
Computers
7
Computer program?
9
10
What is the goal of
programming?
How to write a program?
Algorithms
Problem: How to cook a pancake?
Input:
1 cup of milk, 2 tablespoons of
sugar, 1 cup of flour, 3 large eggs, 1
pinch of salt, and oil for the pan

Output:
A stack of pancakes on a plate
1. Mix flour, eggs, sugar, and salt with an egg beater until
the mixture is homogeneous.
2. Slowly add the milk while stirring the mixture.
3. Heat a pan with oil.
4. Repeat the following steps:
5. Take a ladle of batter and pour into the pan.
6. Fry pancake on one side.
7. Flip pancake.
8. Fry pancake on other side.
9. Take pancake out of the pan.
10. Put pancake onto plate.
11. Until bowl is empty.
12. Return plate with pancakes
flowchart
Problem: Grade classification
pseudocode
Problem: Game space shooter
Programming Languages
Platforms
Programming tools
Text Editors

Notepad Notepad++ VS Code


IDE
(Integrated Development Environment)

Eclipse PyCharm PHPStorm


Compilers or interpreters
Programming syntax
JavaScript
Let’s try JS!
Variables
 Using let
 Using var
 Using const
Data Types
 String – (Letters, special characters words, sentences)
 Number – ( Whole numbers, decimal numbers)
 Boolean – ( True or False)
 Null – ( Empty )
 Undefined – (undeclared)
 Date – (DateTime)
Comments
 Single Line comments (//)
 Multi-line comments (/***/)
Operators
 Assignment
 Arithmetic
 Relational
 logical
Conditional Statements
 If statement
 If…else statement
 If…elseif statement
 Switch statement
Loops
 For loop
 While loop
 Do while loop
 Nested loops
thanks!
Any questions?

You might also like