COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
Computer Programming 1 (Fundamentals of Programming)
Subject Title: Computer Programming 1 / Fundamentals of Programming
CourseDescription:
This is an introductory course in programming which aims to develop skills
and concepts that are essential to good programming practice and problem
solving. It covers fundamental programming concepts of primitive data types,
arrays, simple I/O, conditional statements, iterative structures and functions using
command line interface. It also includes the use of testing and debugging
techniques. Fundamental to the software development practice is the ability to
develop programs that uses appropriate constructs aside from achieving desired
results to solve computing problems. This course also serves as a preparation for
intermediate programming. At the end of the course, the students are expected
to be able to make judicious choices of programming constructs to solve
computing problems using appropriate coding standards.
Topics/Scope to be Covered:
Introduction to Programming and Algorithms
Flowcharts and Pseudocode
Variables, Constants, and Data Types
Input/Output Operations
Operators and Expressions
Conditional Statements (if, else, switch)
Looping Constructs (while, for, do-while)
Functions and Parameters
Arrays (optional depending on scope)
Basic Error Handling and Debugging
Expected Outputs:
Simple interactive console programs
Problem-solving assignments using flowcharts and pseudocode
Mini-project (e.g., calculator, grade average app, simple game logic)
Real-World Application:
This course prepares students for more advanced subjects such as
Object-Oriented Programming, Data Structures, and Web Development.
The skills learned here are foundational to becoming a software
developer, programmer, or IT analyst.
Class Rules and Guidelines
Respect everyone. - Listen when someone is speaking, no interrupting.
Attendance - Arrive on time and submit tasks on schedule.
Participation and Cooperation - Engage in discussions, coding exercises, and
group work.
Minimize distractions - Keep phones on silent; focus during class.
Comply – Completion of all the activities and projects on time. Ask questions
when confused. Help classmates if you can.
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
WEEK 1: PROGRAMMING CONCEPTS
Learning Objectives:
- Define software and hardware
- Identify types of programmers
- Explain the steps of problem solving
- Identify the elements of programming
- Classify the programming paradigms
Computer seems intelligent machines?
Software – set of instructions, programs, or data that tells a computer what to do. It enables
computers to perform specific tasks, solve problems or provides services.
- Created using a collection of codes that instructs the computer on what it will do.
Types of software
1. System Software – Manages computer hardware resources (OS like windows,
macOS)
2. Application Software – Performs specific tasks for users (word processing, web
browsing, gaming)
3. Utility Software – Helps maintain or configure computer systems (e,g. disk
cleanup, antivirus software)
Programmers – the people who write program codes.
Hardware – Physical components of a computer system.
Problem-solving – step by step approach to create an effective “product”
Elements of Programming – Ingredients to all programming matters
Programming Paradigm – Techniques or style on how you do it.
SOFTWARE
- Consist of list of instructions
- Reason why we can communicate in our hardware (Drivers)
- Reason why we can use applications like word, calculator, games, etc. (OS)
- Can contain data
PROGRAMMERS
- System Programmers
- Application Programmers
Types of Application Programmers;
4. Database app Programmers
5. Web App Programmers
6. Game Developers
7. Micro Devices Programmers
HARDWARE
- Physical or tangible parts of a computer system. Either Input or Output device.
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
PROBLEM SOLVING
- Steps in Programming
- It is the process of identifying a problem, breaking it down into smaller steps, and
writing a program that solves it.
STEPS IN PROBLEM-SOLVING
1. Understand the problem
- What is being asked?
- What are the inputs and outputs?
2. Plan the Solution
- Choose an approach (algorithm)
- Break it into smaller tasks
3. Write the code
- Implement your plan using a programming language
4. Test the Code
- Try different test cases (including edge cases)
5. Debug
- Fix error and optimized if needed.
ELEMENTS OF PROGRAMMING
1. INPUT – Input is the data or information that a program receives from the
user, a file, a sensor, or any external source.
2. DATA – Data refers to the values or information that the program works
with. It can be numbers, text, or even more complex structures like lists or
objects.
3. OPERATIONS - Operations are the actions or calculations performed on
the data. These include arithmetic operations (like +, -, *, /), comparisons,
or logical evaluations.
Summary Table
Element Meaning Example
Input Getting information from the user or external source Input("Enter your name: ")
Data The values or information the program uses age = 20, name = "Anna"
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
Element Meaning Example
Operations Actions performed on data like calculations or decisions sum = a + b, if age > 18:
4. OUTPUT - is the result or information that a program displays or sends to
the user, a file, or another system after processing the input and data.
5. CONDITIONAL - allows a program to make decisions. It runs a certain
part of the code only if a specific condition is true.
6. LOOPS - are used to repeat a block of code multiple times — either a
fixed number of times or while a condition is true.
7. SUBROUTINE - is a named block of code that performs a specific task.
It can be called or used multiple times within a program to avoid
repetition. Subroutines help make programs more organized, readable,
and easier to debug.
Subroutines are also called:
Functions (in many programming languages like Python, C++)
Procedures (in older languages like Pascal or BASIC)
PROGRAMMING PARADIGM
- STYLES, METHODS, PROCEDURES ON HOW TO PROGRAM…
- OOP, PROCEDURAL, MODULAR, DATA ABSTRACTION ETC…
We use its different style of programming methods/styes for collaboration and
methods of other languages.
Minimizing redundant errors and time consumed when creating a program.
PROGRAMMING CONCEPT: NUMBER SYSTEM
Learning Objectives:
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
1. Develop knowledge about the different number system.
2. Convert values into different number systems.
NUMBER SYSTEM
- It is a particular way on how to represent numbers. A number can be
consisted of a digit or a series of digits.
- A number system is a way to represent and express numbers using a set
of symbols (digits) and a base (radix). In programming and digital
electronics, different number systems are used depending on the context.
(When you say digit, it is only one symbol that represent a number. The number
143 consists of 3 digits 1, 4 and 3.
Why is it important in programming?
Computers store and process all data in binary form.
Programmers often use hexadecimal and binary for memory addresses,
color codes, and bitwise operations.
Common Types of Number Systems:
Number
Base Digits Used Example Used In
System
0, 1, 2, 3, 4, 5, 6, Everyday numbers
Decimal 10 125
7, 8, 9 (human use)
Computers and digital
Binary 2 0, 1 1010
circuits
Low-level computing
Octal 8 0–7 75
(older)
Memory addresses, color
Hexadecimal 16 0–9, A–F 1A3F
codes
1. DECIMAL
- is the standard number system we use in daily life. It is base 10, meaning
it uses 10 digits. Examples: 0,1,2,3,4,5,6,7,8,9
- Used by humans for counting and arithmetic.
2. BINARY
- The Binary system is base 2, meaning it uses only two digits: 0 and 1.
- Used by computers and digital devices, because they work with
electrical signals (on/off or 1/0).
3. OCTAL
- The Octal system is base 8, using eight digits: 0, 1, 2, 3, 4, 5, 6, 7
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
- Used in some older computing systems and low-level programming.
4. HEXADECIMAL
- the Hexadecimal system is base 16, using 16 symbols: 0–9 and A–F
(where A=10, B=11, ..., F=15)
CONVERSION:
BINARY TO DECIMAL
2 10 ---------- BASE/WEIGHT
1&0 0,1,2,3,4,5,6,7,8,9
1001
1. Write downwards
2. Multiply by its weight
3. Add units from bottom to top
Remember: that any number raise to 0 is 1.
4. Sum/get the total
DECIMAL TO BINARY
10 2
1. Write the given decimal and divide it by 2.
2. Write quotient and remainder
3. To answer the binary, Write upwards
I. MULTIPLE CHOICE (1 point each)
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
Instructions: Choose the best answer and write the letter on the space
provided.
1. ___ What is the primary purpose of programming?
a. Create games
b. Tell the computer what to do
c. Design graphics
d. Browse the internet
2. ___ Which of the following is NOT a programming language?
a. Python
b. Java
c. HTML
d. Microsoft Word
3. ___ What is an algorithm?
a. A hardware component
b. A type of programming language
c. A step-by-step procedure to solve a problem
d. An error in the code
4. ___ Which symbol is used for single-line comments in C++?
a. #
b. //
c. /*
d. <!--
5. ___ Which of the following is a valid variable name?
a. 1name
b. my-name
c. totalScore
d. class
II. TRUE or FALSE (1 point each)
Instructions: Write TRUE if the statement is correct and FALSE if it is not.
6. ______ C++ is a high-level programming language.
7. ______ The equal sign (=) in programming is used to compare two values.
8. ______ Syntax errors are mistakes in the grammar of the code.
9. ______ Loops are used to repeat a block of code multiple times.
10. ______ All programming languages use the same syntax.
III. IDENTIFICATION (1 point each)
Instructions: Write the correct term being described.
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
11. ___________ The smallest unit of data in computing, either 0 or 1.
12. ___________ A type of data used to store whole numbers.
13. ___________ A graphical interface where the user writes and compiles
code.
14. ___________ A named space in memory used to store data values.
15. ___________ A diagram that represents the flow of a program.
IV. SHORT ANSWER (2 points each)
Instructions: Answer briefly but clearly.
16. What is the difference between input and output in programming?
17. Give one example of a real-life situation where programming is used.
18. Why is it important to learn problem-solving before writing code?
19. What is the role of a compiler in programming?
20. Give one example of a conditional statement in programming.
V. CODING (Pseudocode) (5 points)
Instructions: Write a simple pseudocode that asks for two numbers and displays
their sum.
Would you like this test to be formatted in Word or PDF, or want a version with
answer key as well?
You said:
WHATS THE ANSWER KEY FOR THAT
ChatGPT said:
Here’s the Answer Key for the Computer Programming 1 Pre-Test I provided
earlier:
✅ Answer Key: Computer Programming 1 Pre-Test
I. MULTIPLE CHOICE
1. b – Tell the computer what to do
2. d – Microsoft Word
3. c – A step-by-step procedure to solve a problem
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
4. b – //
5. c – totalScore
II. TRUE or FALSE
6. TRUE
7. FALSE – = is for assignment; == is for comparison
8. TRUE
9. TRUE
10. FALSE
III. IDENTIFICATION
11. Bit
12. Integer
13. IDE (Integrated Development Environment)
14. Variable
15. Flowchart
IV. SHORT ANSWER (Accept similar correct answers)
16.
Input is data provided to the program (e.g., user typing a number).
Output is the result displayed by the program (e.g., printing the result).
17.
Example: Programming is used in ATMs to process transactions.
18.
Reason: Because understanding the problem helps in writing correct and
efficient code.
19.
A compiler converts source code into machine code so it can be
executed.
20.
Example:
COMPUTER COMMUNICATION DEVELOPMENT INSTITUTE, INC.
Sikatuna St., Old Albay, Legazpi City
cpp
CopyEdit
if (age >= 18) {
cout << "You are an adult.";
V. CODING (Pseudocode Sample)
pseudocode
CopyEdit
Start
Declare num1, num2, sum
Display "Enter first number: "
Input num1
Display "Enter second number: "
Input num2
sum ← num1 + num2
Display "The sum is ", sum
End