INTRODUCTION
CpE 101- Computer Programming
Agenda
1 2 3 4 5
Syllabus Introduction Python IDE Basic Syntax Basic
Input/Output
2 Presentation title 20XX
Syllabus
Course Title Computer Programming
Course Category Allied Course
Semester/year Second Semester / 2025-2026
Camille Joy C. Sosa (MIT 30 units earned) 55703
Course Instructor Lecturer I
[Link]@[Link]/09155842098
3
Syllabus
Course Code CpE 101
Prerequisite(s) Second Year Standing
Credit Hours 3 hours lab
Course Rationale This course introduces students to the fundamental concepts and techniques in computer programming. Although
and Description the course does not require prior experience in programming, students shall use a high-level programming
language (Python) to convert formulated logic into computer programs.
4
Syllabus
Criteria for Major Exam - 20%
Assessment Laboratory Assessment - 45%
Quiz - 10%
Final Project - 25%
5
Syllabus
6
Syllabus
7
Syllabus
8
Syllabus
9
Syllabus
10
Syllabus
11
Syllabus
12
Syllabus
13
Syllabus
14
INTRODUCTION
What is Computer Programming?
• Programming or Computer programming is a way of giving an instruction to a
computer to perform a specific task. In programming world, it often refer to as
coding.
• A sequence of instruction that a computer is executing is called computer program. A
set of computer programs can create a software.
INTRODUCTION
Programming Languages
• A quest to provide a common language that a computer and human will understand
leads to the development of programming languages. There are a lot of programming
language that have been develop but all of these are divided into two types; Low-
level Language and High-Level Language.
• Low-Level Languages - It has no abstraction and the programming rely closely to the
computer architecture. To create a program using a low-level language, the
programmer must understand the architecture of the computer system such as the
number of registers, the size of memory, register and cache, how the device are
connected to each other, how many instruction the machine is capable and what are
these instructions.
INTRODUCTION
Programming Languages
• Low level program codes are divided into two parts. the opcode and the operand.
• High- Level Languages - It has a high-level of abstraction and focus mainly on the
programming logic rather than the underlying hardware architecture. It is more user
friendly and generally independent from the computer hardware.
INTRODUCTION
Python Programming Language
• Python is a high-level programming
language. Open source and community
driven. Source can be compiled or run
just-in-time. Similar to perl, tcl, ruby
INTRODUCTION
Why Python?
• It has simplified syntax and not
complicated, which gives more emphasis
on natural language.
INTRODUCTION
Python has shorter syntax
and beginner friendly
PYTHON PRINT
STATEMENT
>>> print("Hello World")
Hello World
>>>
INTRODUCTION
Python IDE
• An integrated development environment (IDE) is a software application
that provides comprehensive facilities for software development.
INTRODUCTION
Python Basic Terms
• A variable stores data that can be used and
updated later.
INTRODUCTION
Identifiers and Naming Rules in Python
• Start with a letter or an underscore (_)
Valid Examples
Python Basic Terms
• Identifiers are the names used to
identify variables, functions, classes,
and other objects in Python.
Invalid Examples
INTRODUCTION
Identifiers and Naming Rules in Python
• Only letters, numbers, and underscores are allowed
Valid Examples
Python Basic Terms
• Identifiers are the names used to
identify variables, functions, classes,
and other objects in Python. Invalid Examples
INTRODUCTION
Identifiers and Naming Rules in Python
• Cannot contain spaces
Valid Examples
Python Basic Terms
• Identifiers are the names used to
identify variables, functions, classes,
and other objects in Python. Invalid Examples
INTRODUCTION
Identifiers and Naming Rules in Python
• Case-sensitive: Python treats uppercase and lowercase letters as
different.
Python Basic Terms Examples
• Identifiers are the names used to
identify variables, functions, classes,
and other objects in Python.
INTRODUCTION
Identifiers and Naming Rules in Python
• Cannot use Python keywords or reserved words
Valid Examples
Python Basic Terms
• Identifiers are the names used to
identify variables, functions, classes,
and other objects in Python. Invalid Examples
INTRODUCTION
Python Basic Terms
• Keywords are reserved words in Python
that have specific meanings.
• Cannot be used as variable names.
INTRODUCTION
Python Basic Terms
• Data types is defined as the type of data a
variable holds.
INTRODUCTION
Python Basic Terms
• Python uses indentation to define blocks
of code instead of braces {}.
• It is mandatory in Python.
INTRODUCTION
Python Basic Terms
• Exception an error that occurs during the
execution of a program.
• Can be handled using try and except.
INTRODUCTION
What is INPUT and OUTPUT in programming?
• Input: Getting data from the user during program execution.
• Output: Displaying data or results to the user.
INTRODUCTION
Output in Python
• Use the print() function to display information on the screen.
• Can handle multiple items separated by commas.
INTRODUCTION
Formatting Output in Python
• Use f-strings for clean and readable formatting
INTRODUCTION
Formatting Output in Python
• Or use [Link]() method:
INTRODUCTION
Formatting Output in Python
• Left Align text : <15
OUTPUT:
{name:<15}: Aligns name to the left within a 15-character field.
INTRODUCTION
Formatting Output in Python
• Right Align text : >15
OUTPUT:
{name:>15}: Aligns name to the right within a 15-character field.
INTRODUCTION
Formatting Output in Python
• Align with decimals
OUTPUT:
INTRODUCTION
Formatting Output in Python
• Align with decimals
OUTPUT:
INTRODUCTION
Input in Python
• Use the input() function to get user input.
• Input is always treated as a string.
INTRODUCTION
LET’S DO YOUR FIRST PROGRAM
START DEMO
DEMO CODE
DEMO CODE
THANK YOU
CpE 101- Computer Programming