1st pu notes

1st PUC Computer Science Chapter 4 Notes – Introduction to Problem Solving

Venkatesh A August 13, 2026 17 min read
1st PUC Computer Science Chapter 4 Notes – Introduction to Problem Solving | VerakWorld

1st PUC / Class 11 – Simple Notes & Exam Preparation

Based on the NCERT textbook chapter. Every major topic and textbook example is covered in simple language.

AlgorithmsFlowchartsPseudocodeFlow of ControlVerificationCodingDecomposition

📌 Chapter Overview

This chapter teaches how a computer problem is understood, solved step by step, represented as an algorithm, converted into a program, tested and improved.

📚 Table of Contents

  1. 4.1 Introduction
  2. 4.2 Steps for Problem Solving
  3. 4.3 Algorithm
  4. 4.3.1 Characteristics of a Good Algorithm
  5. 4.4 Representation of Algorithms
  6. 4.4.1 Flowchart – Visual Representation
  7. Example 4.1 – Square of a Number
  8. Example 4.2 – Non-functioning Light Bulb
  9. 4.4.2 Pseudocode
  10. Example 4.3 – Sum of Two Numbers
  11. Example 4.4 – Area and Perimeter of a Rectangle
  12. Benefits of Pseudocode
  13. 4.5 Flow of Control
  14. 4.5.1 Sequence
  15. 4.5.2 Selection
  16. Example 4.5 – Odd or Even
  17. Example 4.6 – Age Classification
  18. Example 4.7 – Dragons and Wizards
  19. 4.5.3 Repetition
  20. Example 4.8 – Average of 5 Numbers
  21. Example 4.9 – Average Until 0
  22. 4.6 Verifying Algorithms
  23. Time Addition – Verification Example
  24. 4.7 Comparison of Algorithm
  25. Time Complexity and Space Complexity
  26. 4.8 Coding
  27. Syntax
  28. Low-Level and High-Level Languages
  29. Source Code and Language Choice
  30. 4.9 Decomposition
  31. Chapter Summary
  32. Exam-Focused Important Questions

4.1 Introduction

Computers are used to do many tasks faster and more accurately. Railway reservation is one example of a complex task made easier with computers. Computers themselves cannot solve a problem; we must give precise step-by-step instructions. Problem solving means identifying a problem, developing an algorithm and implementing it as a computer program.

Key Points

  • Computerisation means using computers and software to automate routine human tasks efficiently.
  • Correct problem definition, correct algorithm and correct program are important.
  • Problem solving is an essential skill in Computer Science.

4.2 Steps for Problem Solving

A complex problem needs a methodical approach. Problem solving starts with clearly identifying the problem and ends with a complete working program or software.

Key Points

  • Analysing the problem – understand the problem and identify inputs and outputs.
  • Developing an algorithm – prepare and refine the solution before coding.
  • Coding – convert the final algorithm into a programming language.
  • Testing and debugging – test different inputs, find errors and correct them.
  • Maintenance – fix user problems and add or modify features after delivery.

4.3 Algorithm

An algorithm is a finite sequence of exact steps that solves a problem or accomplishes a required task. It has a definite beginning, a definite end and a finite number of steps.

Key Points

  • It acts as a roadmap before writing a program.
  • It improves reliability, accuracy and efficiency.
  • More than one algorithm may solve the same problem.
  • While writing an algorithm, clearly identify Input, Processing and Output.
  • GCD example: GCD of 45 and 54 is 9.

4.3.1 Characteristics of a Good Algorithm

The chapter gives five important characteristics.

Key Points

  • Precision – every step is clearly stated.
  • Uniqueness – each step has a clearly defined result.
  • Finiteness – the algorithm stops after a finite number of steps.
  • Input – the algorithm receives input.
  • Output – the algorithm produces output.

4.4 Representation of Algorithms

After identifying the logical steps, an algorithm can be represented using a flowchart or pseudocode. Both should show the solution logic and clearly reveal the flow of control.

Key Points

  • Flowchart – graphical representation of an algorithm.
  • Pseudocode – human-readable, non-formal representation of an algorithm.

4.4.1 Flowchart – Visual Representation

A flowchart uses standard shapes connected by arrows. Each shape represents a step and arrows show the order of flow.

Key Points

  • Start/End (Terminator) – shows where the flow starts and ends.
  • Process – represents an action or process.
  • Decision – asks a yes/no or true/false question and branches.
  • Input/Output – used to input or output data.
  • Arrow – shows the order of flow.

Simple Flowchart Visual

START
verakworld.com
INPUT
verakworld.com
PROCESS
verakworld.com
DECISION?
verakworld.com
OUTPUT
verakworld.com
END
verakworld.com

Flowchart logic is redrawn as an educational SVG/CSS-style diagram; the small verakworld.com watermark is placed below each label.

Example 4.1 – Square of a Number

Input: number whose square is required. Process: multiply the number by itself. Output: square of the number.

Key Points

  • Step 1: Input a number and store it in num.
  • Step 2: Compute num * num and store it in square.
  • Step 3: Print square.

Example 4.2 – Non-functioning Light Bulb

The chapter uses a flowchart to solve a simple real-life problem: checking a non-functioning bulb and deciding the next action based on conditions.

Key Points

  • Follow the decision flow shown in the chapter.
  • Use Decision symbols for condition checking.
  • Use arrows to show the direction of the solution.

4.4.2 Pseudocode

Pseudocode is a non-formal language used to describe algorithm instructions in a particular order. It is intended for humans and cannot be executed directly by a computer. There is no single standard format.

Key Points

  • INPUT
  • COMPUTE
  • PRINT
  • INCREMENT
  • DECREMENT
  • IF/ELSE
  • WHILE
  • TRUE/FALSE

Example 4.3 – Sum of Two Numbers

The chapter represents the solution using simple pseudocode.

Key Points

  • input num1
  • input num2
  • COMPUTE Result = num1 + num2
  • PRINT Result

Pseudocode

input num1
input num2
COMPUTE Result = num1 + num2
PRINT Result

Example 4.4 – Area and Perimeter of a Rectangle

The chapter uses length and breadth as inputs and calculates both area and perimeter.

Key Points

  • input length
  • input breadth
  • compute Area = length * breadth
  • print Area
  • compute Perim = 2 * (length + breadth)
  • print Perim

Pseudocode

input length
input breadth
compute Area = length * breadth
print Area
compute Perim = 2 * (length + breadth)
print Perim

Benefits of Pseudocode

Pseudocode gives a simple plan before actual coding.

Key Points

  • Shows the basic functionality before coding.
  • Helps avoid missing important steps.
  • Easy for non-programmers to read and review.
  • Helps confirm that the proposed solution can produce the desired output.

4.5 Flow of Control

Flow of control describes how events move through an algorithm. The chapter explains three forms: sequence, selection and repetition.

Key Points

  • Sequence
  • Selection
  • Repetition / Iteration / Loop

4.5.1 Sequence

In sequence, all statements are executed one after another in order.

Key Points

  • Examples 4.3 and 4.4 follow sequential execution.
  • Each step is completed before the next step is performed.

4.5.2 Selection

Selection means choosing an alternative based on a condition. Conditions have true or false outcomes. In programming, ‘otherwise’ is represented using ELSE.

Key Points

  • Example: if age >= 18, a person is eligible to vote; otherwise not eligible.
  • Conditional statements perform actions depending on true/false values.
  • Binary values mean True and False.

Example 4.5 – Odd or Even

Input: a number. Process: check whether it is divisible by 2. Output: Even or Odd.

Key Points

  • PRINT “Enter the Number”
  • INPUT number
  • IF number MOD 2 == 0 THEN
  • PRINT “Number is Even”
  • ELSE
  • PRINT “Number is Odd”

Pseudocode

PRINT "Enter the Number"
INPUT number
IF number MOD 2 == 0 THEN
    PRINT "Number is Even"
ELSE
    PRINT "Number is Odd"

Example 4.6 – Age Classification

The chapter categorises a person as Child, Teenager or Adult.

Key Points

  • INPUT Age
  • IF Age < 13 THEN → Child
  • ELSE IF Age < 20 THEN → Teenager
  • ELSE → Adult

Pseudocode

INPUT Age
IF Age < 13 THEN
    PRINT "Child"
ELSE IF Age < 20 THEN
    PRINT "Teenager"
ELSE
    PRINT "Adult"

Example 4.7 – Dragons and Wizards

This card-game example demonstrates multiple conditions. Diamonds or clubs give a point to DRAGONS. A numbered heart gives a point to WIZARDS. A non-number heart gives a point to DRAGONS. Other cards give a point to WIZARDS. The team with the higher score wins.

Key Points

  • Input: shape and value.
  • Process: increase the appropriate team’s score.
  • Output: winning team.
  • Dpoint stores Dragon points and Wpoint stores Wizard points.

Pseudocode Structure

INPUT shape
INPUT value
SET Dpoint = 0, Wpoint = 0
IF diamond OR club → INCREMENT Dpoint
ELSE IF heart AND number → INCREMENT Wpoint
ELSE IF heart AND not a number → INCREMENT Dpoint
ELSE → INCREMENT Wpoint
IF Dpoint > Wpoint → Dragon team wins
ELSE → Wizard team wins

4.5.3 Repetition

Repetition means doing something again and again. In programming it is also called iteration or loop.

Key Points

  • A loop repeats statements until a specified condition is satisfied.
  • For a fixed number of repetitions, a counter can keep track of repetitions.
  • Example: accept 5 numbers and calculate their average.
  • When the number of repetitions is unknown, WHILE can be used.

Example 4.8 – Average of 5 Numbers

The chapter uses count and sum to accept five numbers and calculate their average.

Key Points

  • Set count = 0, sum = 0.
  • While count < 5, input a number.
  • Add the number to sum.
  • Increase count by 1.
  • Average = sum / 5.
  • Print average.
Step 1: Set count = 0, sum = 0
Step 2: While count < 5
Step 3: Input num
Step 4: sum = sum + num
Step 5: count = count + 1
Step 6: average = sum / 5
Step 7: Print average

Example 4.9 – Average Until 0

Here the number of inputs is not known in advance. The user enters numbers until 0 is entered.

Key Points

  • Set count = 0, sum = 0.
  • Input num.
  • While num is not equal to 0, add it to sum, increase count and input the next number.
  • Average = sum / count.
  • Print average.
Step 1: Set count = 0, sum = 0
Step 2: Input num
Step 3: While num is not equal to 0
Step 4: sum = sum + num
Step 5: count = count + 1
Step 6: Input num
Step 7: average = sum / count
Step 8: Print average

4.6 Verifying Algorithms

Verification checks whether an algorithm works correctly. A dry run means taking an input and following the algorithm step by step to see the result.

Key Points

  • Verification helps identify incorrect steps.
  • It can reveal missing details.
  • It can show cases where an algorithm does not work as intended.
  • Verifying before software development reduces the effort needed to find and fix mistakes.

Time Addition – Verification Example

The chapter shows why verification is important. Adding 4 hrs 50 mins and 2 hrs 20 mins directly gives 6 hrs 70 mins, which is not a valid time representation. The correct result is 7 hrs 10 mins.

Key Points

  • Add hours and minutes separately.
  • If mm_total >= 60, increase hh_total by 1.
  • Then subtract 60 from mm_total.
  • Print the corrected total time.
hh_total = hh1 + hh2
mm_total = mm1 + mm2
IF (mm_total >= 60) THEN
    hh_total = hh_total + 1
    mm_total = mm_total - 60
PRINT hh_total, mm_total

4.7 Comparison of Algorithm

More than one algorithm can solve the same problem. The chapter compares four methods for checking whether a number is prime.

Key Points

  • Method 1: test divisors from 2 up to the number.
  • Method 2: test only up to half the number.
  • Method 3: test only up to the square root of the number.
  • Method 4: use a previously stored list of prime numbers.
  • Different algorithms can be compared using processing time and memory.

Time Complexity and Space Complexity

Time complexity tells how much processing time an algorithm needs. Space complexity tells how much memory it needs.

Key Points

  • Method 2 is better than Method 1 because it checks fewer values.
  • Method 3 reduces calculations further by checking up to the square root.
  • Method 4 can reduce calculations further but needs extra memory for the prime list.
  • Algorithm choice depends on efficiency in time and memory.
ConceptSimple Meaning
Time ComplexityHow much processing time is needed?
Space ComplexityHow much memory is needed?

4.8 Coding

After finalising an algorithm, it is coded in a selected high-level programming language.

Key Points

  • Coding converts the algorithm into instructions understood through a programming language.
  • The programmer follows the syntax of the language.
  • Coding procedures should be documented.

Syntax

Syntax is the set of rules or grammar governing the formulation of statements in a programming language.

Key Points

  • It includes spelling.
  • It includes the order of words.
  • It includes punctuation.

Low-Level and High-Level Languages

Machine or low-level language uses binary digits 0 and 1 and is directly understood by computer hardware, but it is difficult for humans. High-level languages are closer to natural language and are easier to read, write and maintain.

Key Points

  • High-level languages are more portable.
  • Examples in the chapter: FORTRAN, C, C++, Java and Python.
  • Low-level programs are tied more closely to a particular type of computer.

Source Code and Language Choice

A program written in a high-level language is called source code. It is translated into machine language using a compiler or interpreter.

Key Points

  • Language choice depends on the platform and application.
  • Applications may be desktop, mobile or web applications.
  • Programs can also be written for embedded systems such as digital watches, traffic signals, vehicles and medical equipment.

Figure 4.2 – Flowchart to Calculate Square of a Number

Algorithm representation for finding the square of a number.
Start verakworld.com Input num verakworld.com square = num*num verakworld.com Print square verakworld.com Stop verakworld.com

Figure 4.3 – Flowchart to Solve a Non-functioning Light Bulb

Decision-based flowchart from the textbook example.
Start verakworld.com Is the bulb switched on? verakworld.com No Switch On verakworld.com Bulb On? verakworld.com Yes Yes Is it Burnt Out? verakworld.com No Call Electrician verakworld.com Yes Replace the Bulb verakworld.com Stop verakworld.com

Figure 4.4 – Flowchart to Display Sum of Two Numbers

Start verakworld.com Read num1, num2 verakworld.com Result = num1 + num2 verakworld.com Print Result verakworld.com Stop verakworld.com

Figure 4.5 – Flowchart to Calculate Area and Perimeter of a Rectangle

Start verakworld.com Input length, breadth verakworld.com Area = length * breadth verakworld.com Print Area verakworld.com Perim = 2*(length + breadth) verakworld.com Print Perim verakworld.com End verakworld.com

Figure 4.7 – Actions Depending on True or False of a Condition

Condition verakworld.com True False Do this verakworld.com Do that or do nothing verakworld.com

Figure 4.8 – Flowchart to Check Whether a Number is Even or Odd

Start verakworld.com Input num1 verakworld.com Is num1 mod 2 == 0? verakworld.com Yes Print “Even” verakworld.com No Print “Odd” verakworld.com Stop verakworld.com

Figure 4.9 – Flowchart to Check Multiple Conditions

Start verakworld.com Enter Age verakworld.com Age < 13? verakworld.com Yes “Child” verakworld.com No Age < 20? verakworld.com “Teenager” verakworld.com No “Adult” verakworld.com Stop verakworld.com

Figure 4.10 – Flowchart to Calculate the Average of 5 Numbers

Start verakworld.com count=0, sum=0 verakworld.com count < 5 verakworld.com Yes Input num verakworld.com sum = sum + num verakworld.com count = count + 1 verakworld.com No average = sum / 5 verakworld.com Print average verakworld.com Stop verakworld.com

Figure 4.11 – Flowchart to Accept Numbers Till the User Enters 0

Start verakworld.com count=0, sum=0 verakworld.com Input num verakworld.com num == 0? verakworld.com No sum=sum+num verakworld.com count=count+1 verakworld.com Input num verakworld.com Yes average = sum/count verakworld.com Print average verakworld.com Stop verakworld.com
4.9 Decomposition

Decomposition means breaking a complex problem into smaller and easier sub-problems. The smaller solutions are then combined logically to solve the larger problem.

Key Points

  • Smaller problems are easier to solve.
  • Each sub-problem can be examined in detail.
  • Sub-problems can be solved independently.
  • Different teams can work on different sub-problems.
  • After solving them, they must be tested and integrated.
  • Examples: mathematics and science problems, school event management, weather forecasting and delivery management.

Chapter Summary

The chapter focuses on solving problems systematically using algorithms and programs.

Key Points

  • Algorithm = step-by-step solution.
  • Good algorithm = precise, unique, finite, with input and output.
  • Algorithms can be represented by flowcharts or pseudocode.
  • Flow of control = sequence, selection and repetition.
  • Algorithms should be verified before implementation.
  • Algorithms can be compared using time and space complexity.
  • Coding uses a programming language and its syntax.
  • Decomposition divides a complex problem into smaller sub-problems.

Exam-Focused Important Questions

Prepare these questions from the chapter.

Key Points

  • Define problem solving.
  • Define algorithm.
  • List the characteristics of a good algorithm.
  • What are the two methods of representing an algorithm?
  • Define flowchart and explain its symbols.
  • Define pseudocode and list its common keywords.
  • Explain sequence, selection and repetition.
  • Write pseudocode to check odd/even.
  • Explain the average-of-5-numbers algorithm.
  • What is a dry run?
  • Why should algorithms be verified?
  • Differentiate time complexity and space complexity.
  • Explain low-level and high-level languages.
  • What is syntax?
  • What is source code?
  • Explain decomposition and its advantages.

📝 Short Questions & Answers

Q1. What is an algorithm?
It is a finite sequence of exact steps used to solve a problem.
Q2. What are the characteristics of a good algorithm?
Precision, uniqueness, finiteness, input and output.
Q3. What is a flowchart?
A graphical representation of an algorithm using standard symbols and arrows.
Q4. What is pseudocode?
A human-readable, non-formal representation of an algorithm.
Q5. What is selection?
Choosing an action or alternative based on a condition.
Q6. What is repetition?
Executing statements repeatedly until a specified condition is satisfied.
Q7. What is a dry run?
Following an algorithm with an input step by step to check its result.
Q8. What is syntax?
The rules or grammar for forming statements in a programming language.
Q9. What is source code?
A program written in a high-level programming language.
Q10. What is decomposition?
Breaking a complex problem into smaller, easier sub-problems.

⚡ Quick Revision

  • Problem solving → identify problem → algorithm → program.
  • Algorithm → exact + finite steps.
  • Good algorithm → Precision + Uniqueness + Finiteness + Input + Output.
  • Representation → Flowchart + Pseudocode.
  • Flow of control → Sequence + Selection + Repetition.
  • Verification → Dry run and testing.
  • Comparison → Time complexity + Space complexity.
  • Coding → programming language + syntax.
  • Decomposition → divide a complex problem into smaller problems.

🎯 Exam Point of View

  • Learn all definitions exactly in simple meaning.
  • Practise flowchart symbols.
  • Practise pseudocode examples from the chapter.
  • Understand IF/ELSE and WHILE.
  • Remember the time-addition verification example.
  • Know the difference between time and space complexity.
  • Prepare the decomposition definition and advantages.

📖 Textbook Exercise Topics

The chapter exercises include pseudocode for division, a five-flip cake problem, multiples of 5, fixed loops, collecting ₹200, billing, GST, marks/percentage, greatest of numbers, colour classification, largest/smallest values, water bill, conditionals, flowchart symbols, improving an algorithm, factorial, Armstrong number and algorithm verification. These are kept as practice areas rather than adding unrelated material.

© VerakWorld | Educational Notes • verakworld.com

📌 Textbook-Only Coverage

This blog post is prepared only from the uploaded Class XI Computer Science Chapter 4 PDF. The wording is simplified for students, but the chapter topics, definitions, examples, representations and exercise areas are retained. No outside information has been added.

📝 Complete Short Questions & Answers

Q1. What is problem solving?
Answer: It is identifying a problem, developing an algorithm and implementing it as a computer program.
Q2. What is an algorithm?
Answer: A set of exact steps which, when followed, solves a problem or accomplishes a required task.
Q3. What are the characteristics of a good algorithm?
Answer: Precision, uniqueness, finiteness, input and output.
Q4. What are the two common ways of representing an algorithm?
Answer: Flowchart and pseudocode.
Q5. What is a flowchart?
Answer: A visual representation of an algorithm using shapes connected by arrows.
Q6. What is pseudocode?
Answer: A non-formal, human-readable representation of an algorithm that cannot be directly executed by a computer.
Q7. What is sequence?
Answer: Execution of all statements one after another in order.
Q8. What is selection?
Answer: Choosing an alternative based on the outcome of a condition.
Q9. What is repetition?
Answer: Repeated execution of program statements until a specified condition is satisfied.
Q10. What is a loop?
Answer: A construct that executes some program statements repeatedly until a condition is satisfied.
Q11. What is verification of an algorithm?
Answer: Checking whether an algorithm works correctly for its inputs.
Q12. What is a dry run?
Answer: Following an algorithm step by step with an input to check the result.
Q13. What is time complexity?
Answer: The amount of processing time needed to run an algorithm.
Q14. What is space complexity?
Answer: The amount of memory needed to execute an algorithm.
Q15. What is syntax?
Answer: The set of rules or grammar governing the formulation of statements in a programming language.
Q16. What is source code?
Answer: A program written in a high-level programming language.
Q17. What is decomposition?
Answer: Breaking a complex problem into smaller sub-problems and combining their solutions logically.
Q18. What does GIGO mean?
Answer: Garbage In Garbage Out.
Q19. What is maintenance?
Answer: Fixing user problems, answering queries and adding or modifying features after software delivery.

📚 Textbook Exercise – Practice Questions

  1. Write pseudocode that reads two numbers, divides one by another and displays the quotient.
  2. Design an algorithm for the five-coin-flip cake problem given in the textbook.
  3. Write pseudocode to print all multiples of 5 between 10 and 25.
  4. Give an example of a loop executed a certain number of times.
  5. Write the algorithm for collecting money until the total becomes ₹200.
  6. Write pseudocode to print the bill depending upon price and quantity and calculate GST.
  7. Read Computer Science, Mathematics and Physics marks and calculate aggregate and percentage.
  8. Write an algorithm to find the greatest among two different numbers.
  9. Write the GREEN / BLUE / ORANGE number-range algorithm from the exercise.
  10. Accept four numbers and find the largest and smallest.
  11. Write the water-bill algorithm using the criteria given in the textbook.
  12. What are conditionals? When are they required in a program?
  13. Match flowchart symbols with their functions.
  14. Suggest improvements to the Reach_School_Algorithm.
  15. Write pseudocode to calculate factorial.
  16. Draw a flowchart to check an Armstrong number.
  17. Verify and correct the Classify_Numbers_Algo for the values given in the textbook.
  18. Analyse and improve the Accept_1to100_Algo.

⚡ Final Quick Revision

  • Problem solving → identify problem → algorithm → program.
  • Good algorithm → precision + uniqueness + finiteness + input + output.
  • Representation → flowchart + pseudocode.
  • Flow of control → sequence + selection + repetition.
  • Selection → condition + IF/ELSE.
  • Repetition → iteration/loop; WHILE is used when repetitions are unknown beforehand.
  • Verification → dry run and testing.
  • Comparison → time complexity + space complexity.
  • Coding → high-level language + syntax.
  • Source code → high-level program before translation.
  • Decomposition → smaller sub-problems → combine to solve the bigger problem.

📝 This article was researched and written by Venkatesh A, Founder of verakworld.com.

Leave a Comment