10th Class Computer Science Notes 2026 — Chapter 2 – Federal Board
Class 10 Computer Science — Chapter 2: Computational Thinking and Algorithms
Board: Federal Board
1. Multiple Choice Questions (MCQs)
1. Identify the activity that is based on personal preferences rather than algorithmic logic.
a) Sorting numbers in a list.
b) Deciding what to eat for dinner.
c) Determining if a number is a prime number.
d) Calculating the square root of a number.
Correct Answer: (b) Deciding what to eat for dinner.
2. Counting Principle Problems could easily be understood by the use of:
a) Graph representation
b) Tree representation
c) Clock representation
d) Map representation
Correct Answer: (b) Tree representation.
3. In how many ways can you choose 2 out of 5 different books to take on a trip? (Order does not matter)
a) 10
b) 20
c) 15
d) 5
Correct Answer: (a) 10
Explanation: Using the combination formula:
4. A committee of 3 members is to be selected from a group of 8 people. How many different committees can be formed?
a) 56
b) 84
c) 28
d) 120
Correct Answer: (a) 56
Explanation: Using the combination formula:
5. You have 5 different shirts and 4 different pants. How many different outfits can you make by choosing one shirt and one pair of pants?
a) 9
b) 20
c) 15
d) 10
Correct Answer: (b) 20
Explanation: Using the product rule:
6. In how many ways can you select 3 different fruits from a basket of 7 different fruits? (Order does not matter)
a) 35
b) 21
c) 56
d) 84
Correct Answer: (a) 35
Explanation: Using the combination formula:
7. The Pigeonhole Principle states that if more items are placed into containers than the number of containers, then:
a) Some containers must be empty.
b) At least one container must hold more than one item.
c) All containers will be full.
d) Each item will be placed in a different container.
Correct Answer: (b) At least one container must hold more than one item.
8. In a set of 50 students, 30 have completed a math project, 25 have completed a science project, and 15 have completed both. How many students have completed at least one project?
a) 35
b) 40
c) 45
d) 50
Correct Answer: (b) 40
Explanation: Using the inclusion-exclusion principle:
9. Which property of an algorithm ensures that it produces at least one output after the calculations?
a) Input
b) Output
c) Definiteness
d) Finiteness
Correct Answer: (b) Output.
10. Which property ensures that an algorithm will eventually end after a finite number of steps?
a) Input
b) Finiteness
c) Effectiveness
d) Generality
Correct Answer: (b) Finiteness.
2. Short Response Questions
1. Consider 3 boys and 3 girls who want to team up as pairs for the 14th August-related student performance at school. Find the total number of ways these pairs could be formed using Counting Principle Problems.
Solution:
-
Number of choices for a boy = 3
-
Number of choices for a girl = 3
Using the Fundamental Counting Principle (Product Rule), the total number of ways to form a boy-girl pair is:
Answer: 9 ways.
2. Suppose you have selected black pants to attend a school function and have three options of shirts to choose from. Find the total number of ways you can dress up using Counting Principle Problems.
Solution:
-
Number of pants selected = 1 (fixed choice)
-
Number of shirt options = 3
Total number of ways to dress up:
Answer: 3 ways.
3. You are sitting at a study table doing homework. The penholder on the table contains 2 blue pens, 1 black pen, and 2 lead pencils. How many options do you have for writing?
Solution:
-
Number of blue pens = 2
-
Number of black pens = 1
-
Number of lead pencils = 2
Using the Sum Rule (choosing one writing tool):
Answer: 5 options.
4. For a race on sports day, a group of 20 students are given race lanes at random. There are six students selected for the first race. How many different orders of the six lanes for students may be chosen?
Solution:
This is a permutation problem where order matters.
Answer: 27,907,200 ways.
3. Extended Response Questions
1. Ejaz, Javeria, Liaqat, and Zainab are standing in a line. Here are the clues to determine their positions:
Clues:
a) Javeria is standing directly behind Ejaz.
b) Zainab is not next to Liaqat.
c) Liaqat is not at the end of the line.
d) Zainab is standing in the first position.
Solution:
-
From clue (d), Zainab is in the 1st position:
[Zainab, _, _, _]
-
From clue (b), Zainab (1st) is not next to Liaqat, meaning Liaqat cannot be in the 2nd position.
-
From clue (c), Liaqat is not at the end of the line, so Liaqat cannot be in the 4th position.
-
Therefore, Liaqat must be in the 3rd position:
[Zainab, _, Liaqat, _]
-
The remaining available slots are 2nd and 4th for Ejaz and Javeria.
-
From clue (a), Javeria is directly behind Ejaz, placing Ejaz in the 2nd position and Javeria in the 4th position.
Final Order (1st to 4th):
Zainab, Ejaz, Liaqat, Javeria.
2. Provide students with a detailed map of their school. Ask them to create an abstract version, highlighting only the main buildings and pathways.
Solution (Concept of Abstraction):
Abstraction involves filtering out non-essential details to focus exclusively on the core components necessary for a task.
Steps to Create the Abstract Map:
-
Identify critical landmarks, such as the Administration Block, Science Labs, Library, and Sports Ground.
-
Remove decorative elements such as individual trees, parking dividers, or benches.
-
Draw a simplified layout showing only the major buildings as simple geometric blocks connected by primary pathways.
3. Give students a problem that can be solved with a simple program. Encourage them to write functions to handle different parts of the problem, abstracting complex operations into manageable pieces.
Solution (Example in Python):
The following program calculates a student’s percentage and determines the grade using separate functions.
def calculate_percentage(marks_obtained, total_marks): return (marks_obtained / total_marks) * 100def determine_grade(percentage): if percentage >= 80: return 'A+' elif percentage >= 70: return 'A' else: return 'B'# Main program using functional abstractionpct = calculate_percentage(420, 500)grade = determine_grade(pct)print(f"Percentage: {pct}%, Grade: {grade}")
4. Given the following web form inputs, identify any syntax errors and correct them.
Original Inputs:
-
Name: AmjadAli
-
Email: amjadali@gmail
-
Date: 01/01/2024
Solution:
Errors Identified:
-
Name: Missing a space between the first and last name (Amjad Ali).
-
Email: Missing the top-level domain extension (e.g., .com) at the end of the email address (amjadali@gmail.com).
Corrected Inputs:
-
Name: Amjad Ali
-
Email: amjadali@gmail.com
-
Date: 01/01/2024
5. You have developed a web application that takes the budget head and provides the total. Analyze the following budget and identify any logical errors in the total amount.
Budget Example:
-
Rent: $1000
-
Utilities: $150
-
Groceries: $200
-
Total: $1000 + $150 + $200 = $1500
Solution:
Arithmetic Analysis:
The correct sum is $1350, not $1500.
Logical Error Identified: The program contains an incorrect aggregation formula or hardcoded addition bug, as the displayed total ($1500) does not match the actual sum of the individual budget items ($1350).
Correct Total: $1350
Notes by Sir Dilawar
For more notes, visit QuranEducationPoint.com
