Introduction:
In the modern world of computing, every software system depends on algorithms. These systems can be very simple, like a calculator, or very advanced, like artificial intelligence. In the first week of this course, students will learn the basic ideas behind algorithms. They will practice logical thinking, learn how to solve problems step by step, understand the basic structure of a program, and use pseudo-code. Pseudo-code is a simple way to write instructions that explain logic without using any programming language.
This lecture is prepared to help students develop the mindset of a programmer, so they can understand how programs work even before writing actual code.
What we are going to learn in this lecture?
- Algorithm
- What is Problem Solving in programming?
- Write our first Algorithm
- Input/Output
- Pseudo Code
After learning all these core concepts of programming we’ll discuss what will be the learning outcome of this lecture and some of the practice set problems.
What is Algorithm?
Definition:
“An algorithm is a set of clear and fixed steps that are followed to solve a problem or complete a task. The steps are written in an order and must be easy to understand.“
Think of an algorithm as a set of instructions that tells you exactly what to do, step by step, to get a result.
In computer science, algorithms are used to tell a computer how to perform a task. Without algorithms, computers cannot work properly.

Why Algorithms are important?
Algorithms are important because:
- They help us solve problems in an organized way
- They make solutions easy to understand and repeat
- They help computers process information correctly
- They save time and effort by giving clear instructions
Every program, app, or software system works by following one or more algorithms.
Key Characteristics of an Algorithm:
Some of the important key characteristics of algorithm are:
- Finiteness
- Correctness
- Effectiveness
- Validate
- Verified
- Clear and Unambiguous
- Clear input and output
Examples:
In daily life:
There is a daily life problem to make tea and we can solve this problem by creating a problem algorithm for this.
- Start
- Boil water
- Add tea leaves
- Add sugar
- Pour the tea into a cup
- End
Tip: Steps of Algorithm can be one or more according to user to solve one problem but one important thing is this Algorithm must solve the problem for which it is designed
In Computer Science:
In computers, algorithms are used to:
- Add or subtract numbers
- Search for information
- Sort data
- Display results
- Control machines and robots
Before writing real code, programmers first design algorithms.
This helps them understand the logic and avoid mistakes.
What is Problem Solving in programming?
What is a problem?
“In computer science, a problem means a task that needs to be solved with the help of a computer.”
It describes what we want the computer to do.
A problem usually includes:
- Input: The data given to the computer.
- Process : The steps needed to work on the data.
- Output: The final result we want.
Examples of CS Problems:
- Finding the total of two numbers
- Checking whether a number is even or odd
- Calculating marks and grades of students
- Searching for information in a file
Steps to solve a problem:
There are some steps to solve a problem in problem solving:
- Problem Understanding
- Problem Analysis
- Algorithm Design
- Pseudo-code Writing
- Flowchart Design
- Program Coding
- Program Testing
- Implementation

Input / Output:
What is Input of Algorithm?
“Input means the information that is given to a program. This information can come from a user or from another source.”
Example:
- Entering a number
- Typing a name using the keyboard
- Getting data from a file
What is output of an Algorithm?
“Output is the information that a program gives after processing the input. It shows the result of the work done by the program.”
Example:
- Showing results on the screen
- Printing a document
- Storing data in a file

Pseudo Code:
What is Pseudo Code?
“Pseudo-code is a simple way to write the steps of a program using normal language. It explains the logic of a program without following the rules of any specific programming language.“
Pseudo-code helps turn ideas into clear steps before writing real code.
Why Do We Use Pseudo-Code?
- It is easy for humans to read and understand
- It does not depend on any programming language
- It helps find and fix logical mistakes early
- It is commonly used in exams and technical interviews
Common Words Used in Pseudo-Code
- START / END: shows where the program begins and finishes
- INPUT: used to take data
- OUTPUT: used to show results
- IF / ELSE: used to make decisions
- WHILE / FOR: used for repeating steps
Example:
This is a simple example of pseudo code to solve a problem to add 2 numbers:
START
INPUT A
INPUT B
SUM ← A + B
OUTPUT SUM
END
Common Confusion:
This is a common confusion that some students think Algorithm and Pseudo Code is same but they are different in real.
Algorithm is a set of proper steps to solve a problem and write in proper language like English for better clarification and proper understanding but Pseudo Code is a blend of some programming concepts and some steps in proper language
Exmaple

Learning Outcomes of Week 1
After completing this week, students must be able to:
- Write basic pseudo-code
- Define an algorithm
- Explain problem-solving steps
- Understand program execution
- Identify inputs and outputs
Practice Set Problems:
Here are some practice set problems one can do for practice: