Skip to content
πŸ“š Free notes, MCQ tests & past papers β€” FBISE & BISE Rawalpindi
πŸ“’ Latest Updates

10th Class Computer Science Unit 6 Introduction to Artificial Intelligence and Machine Learning: Exercise Solutions 2027 (Punjab Board / BISE Rawalpindi)

Reviewed by Sadia Shahid, Senior Science teacher (Maths, Physics, Chemistry, Biology, Computer Science)

These are the solved end-of-unit exercises for Unit 6, Introduction to Artificial Intelligence (AI) and Machine Learning (ML), from the new PECTAA Computer Science and Entrepreneurship-10 textbook used by BISE Rawalpindi, Lahore and the other Punjab boards. Every answer is written from the text of the unit, for the 10th Class (SSC Part II) Annual Examination 2027.

This unit covers what AI and ML are and how they differ, supervised and unsupervised learning, everyday and business uses of AI, bias, privacy and responsibility, common algorithms, and the confusion matrix and accuracy.

Unit 6: Introduction to Artificial Intelligence (AI) and Machine Learning (ML)
Class 10th Class (SSC Part II), Punjab boards
MCQs answered 10
Other questions solved 10

Exercise questions deleted in the ALP Smart Syllabus 2027

Under PECTAA’s ALP Smart Syllabus 2027 for Computer Science and Entrepreneurship-10, the following content of Unit 6 is not part of the 2027 annual exam: Topic 6.4.1 Linear Regression (pages 95 and 96) Β· Short Question 8.

The linear regression topic is not examined, so it is not explained on this page. The printed exercise of this edition has only seven short questions, so there is no Short Question 8 to skip here; the seven short questions are all solved below.

Multiple Choice Questions

MCQ 1. What is Artificial Intelligence (AI)?
(a) Solving math problems by hand (b) Machines performing tasks like humans (c) Sending emails using a computer (d) Watching videos online

Ans: (b) Machines performing tasks like humans β€” AI is the ability of a machine or computer program to perform tasks that normally need human thinking and ability.

MCQ 2. Which of the following is an example of AI?
(a) A chatbot replying to your questions (b) Using a whiteboard (c) A TV remote (d) Typing on a keyboard

Ans: (a) A chatbot replying to your questions β€” chatbots, such as the one used by JazzCash, use AI to understand typed questions and answer them.

MCQ 3. What is Machine Learning (ML)?
(a) Teaching humans to use machines (b) Teaching machines to learn from data like humans (c) Learning computer hardware basics (d) A machine without internet

Ans: (b) Teaching machines to learn from data like humans β€” ML is a part of AI in which a machine is trained to learn from past data and make decisions without being programmed every time.

MCQ 4. Which app recommends videos using ML?
(a) Google Maps (b) Microsoft Paint (c) YouTube (d) Windows Media Player

Ans: (c) YouTube β€” YouTube suggests videos based on the watching history of the user.

MCQ 5. In supervised learning, the data is:
(a) Unorganized (b) Without any answers (c) Labeled with correct answers (d) Only text-based

Ans: (c) Labeled with correct answers β€” supervised learning is trained on labeled data, where both the input and the correct output are given.

MCQ 6. Which of the following is an example of unsupervised learning?
(a) Predicting student marks (b) Identifying spam emails (c) Marking quizzes (d) Grouping students by interest without labels

Ans: (d) Grouping students by interest without labels β€” unsupervised learning finds groups in data without labels, like forming study groups from the interests of students.

MCQ 7. Google Assistant is an example of:
(a) A game app (b) A word processor (c) A smart assistant using AI (d) A calculator

Ans: (c) A smart assistant using AI β€” smart assistants such as Google Assistant and Siri use AI to understand voice commands and answer questions.

MCQ 8. What skill is essential for a data analyst?
(a) Painting (b) Basic drawing (c) Interpreting and visualizing data (d) Flying drones

Ans: (c) Interpreting and visualizing data β€” a data analyst works with data: finding the meaning in it (interpreting) and showing it in charts (visualizing), the last two steps of the data science life cycle.

MCQ 9. AI is mostly used for:
(a) Handwriting notes (b) Making phone calls (c) Charging phones (d) Smart decision making and automation

Ans: (d) Smart decision making and automation β€” AI helps businesses and apps make smart decisions and automate work, as in recommendations, chatbots and traffic control.

MCQ 10. A chatbot on JazzCash is an example of:
(a) Cloud computing (b) Data visualization (c) AI in business (d) Unsupervised learning

Ans: (c) AI in business β€” the book gives the JazzCash chatbot for customer support as an example of AI used in business.

Short Answer Questions

Short 1. What is the difference between AI and ML?

Feature AI ML
Definition Making machines smart enough to mimic human behavior. Teaching machines to learn from data and improve.
Main goal To perform smart tasks like humans. To make predictions or decisions from data.
Needs data? Sometimes. Always.
Human-like behavior? Yes (speaking, seeing, understanding). No, it only learns patterns.
Example A chatbot on JazzCash that replies to customers. An app that predicts electricity usage next week.

AI is the broader idea of machines acting smart. ML is a part of AI where machines learn from data.

Short 2. Give one real-life example of AI used in Pakistan.

Ans: Chatbots used by banks such as HBL and by JazzCash answer customer questions without a human agent. Other examples in the book are Urdu speech-to-text apps used in schools and the traffic control system introduced by the Safe City Authority in Lahore.

Short 3. How does supervised learning work?

Ans: The machine is trained with labeled data, which means both the example and the correct answer are given. It compares its own guesses with the correct answers and improves over time. Example: many pictures labeled “Apple” or “Mango” are shown, and later the machine can tell an apple from a mango. A system can also be trained on marks and attendance to predict which students might fail.

Short 4. Define confusion matrix.

Ans: A confusion matrix is a simple table that shows how many predictions (classifications) of a model were correct and how many were wrong. For a pass/fail problem its four cells are:

Predicted: pass Predicted: fail
Actual: pass True Positive (TP) False Negative (FN)
Actual: fail False Positive (FP) True Negative (TN)
  • TP: the model predicted pass and the student actually passed.
  • TN: the model predicted fail and the student actually failed.
  • FP: the model predicted pass but the student actually failed.
  • FN: the model predicted fail but the student actually passed.

Short 5. How can businesses use AI?

Ans: Businesses use AI to understand customers and to answer them. In customer analysis, companies study customer data to find which product sells best. For example, the grocery delivery app Cheetay uses ML to suggest items a customer often buys and to predict which items are needed in which city. Chatbots of banks, telecom companies and online shops answer questions automatically. AI helps businesses work faster, save money and keep customers happy.

Short 6. Give one example each of a smart assistant and a recommendation system.

Type Example
Smart assistant Google Assistant (or Siri). Saying “Kal 8 bajay mujhe jagana” in Urdu sets an alarm using speech recognition and natural language processing.
Recommendation system YouTube recommending videos after you watch a few clips. (Daraz and Instagram are other examples.)

Short 7. What kind of data is used in unsupervised learning?

Ans: Unlabeled data, which means data without any correct answers given. The machine finds patterns or groups similar items by itself, such as grouping customers by shopping behavior or students by interests.

Long Answer Questions

Long 1. Explain supervised and unsupervised learning with suitable examples.

Feature Supervised learning Unsupervised learning
Meaning The machine is trained with labeled data in which the correct output is given. The machine is given data without labels and finds patterns or groups by itself.
Main task Predict or classify. Group or cluster similar data.
Idea Learning with a teacher. Exploring on your own.
Example Predict student results from marks and study hours; identify spam emails; tell apples from mangoes. Group customers by shopping behavior; divide students into study groups by their interests and subjects.
Use in school Identify students who need help. Make automatic student groups for projects.

If the system learns from examples with correct answers it is supervised. If it groups data without being given answers it is unsupervised.

Long 2. Explain how model performance is evaluated in machine learning using (a) confusion matrix, (b) accuracy, (c) precision.

After a model is trained, its performance is measured to decide whether it is accurate and reliable.

(a) Confusion matrix

A table of TP, TN, FP and FN counts that shows how many predictions were correct and incorrect (see Short Question 4). It shows what kind of mistakes the model makes.

(b) Accuracy

Accuracy tells how many predictions were correct out of all predictions made.

Accuracy = (TP + TN) / (TP + TN + FP + FN)

Book example: 15 students, 8 actually passed and 7 failed. TP = 7, TN = 5, FP = 2, FN = 1.

Accuracy = (7 + 5) / (7 + 5 + 2 + 1) = 12 / 15 = 0.80 = 80%. (The textbook prints “0.90 or 80%”; 12 Γ· 15 is 0.80, so 0.90 is a printing mistake.)

(c) Precision

The textbook introduces four performance metrics, but its text explains only the confusion matrix and accuracy. By the standard definition, precision tells how many of the cases the model predicted as positive were really positive:

Precision = TP / (TP + FP)

With the same example: 7 / (7 + 2) = 7 / 9 β‰ˆ 0.78, so about 78% of the students predicted to pass actually passed.

tp, tn, fp, fn = 7, 5, 2, 1
accuracy = (tp + tn) / (tp + tn + fp + fn)
precision = tp / (tp + fp)
print("Accuracy:", accuracy)
print("Precision:", round(precision, 2))

Output:

Accuracy: 0.8
Precision: 0.78

Long 3. A model predicts if students will pass (1) or fail (0). Out of 20 students: TP = 8, TN = 6, FP = 4, FN = 2. (a) Fill the confusion matrix. (b) Calculate accuracy.

(a) Confusion matrix

Predicted: pass (1) Predicted: fail (0)
Actual: pass (1) TP = 8 FN = 2
Actual: fail (0) FP = 4 TN = 6

Check: 8 + 2 + 4 + 6 = 20 students.

(b) Accuracy

Accuracy = (TP + TN) / (TP + TN + FP + FN)
= (8 + 6) / (8 + 6 + 4 + 2)
= 14 / 20
= 0.70 = 70%

tp, tn, fp, fn = 8, 6, 4, 2
print("Total:", tp + tn + fp + fn)
print("Accuracy:", (tp + tn) / (tp + tn + fp + fn))

Output:

Total: 20
Accuracy: 0.7

More for 10th Class Computer Science

The exercise questions are from the PECTAA Computer Science and Entrepreneurship-10 textbook. The deleted list follows the PECTAA ALP Smart Syllabus 2027. Please confirm all dates and figures on the official website: pectaa.edu.pk

Need help with 10th Class Computer Science? Join our live online classes for Matric (Punjab and Federal Board). Book a free demo class.

All chapters of this subject

πŸ“Œ Struggling with this chapter? Join our live online tuition β€” one-to-one or small group classes with experienced teachers. Book a free demo class β†’

Ask a question about this topic

Your email address will not be published. Required fields are marked *