Shaheed Zulfikar Ali Bhutto Institute of Science & Technology University
DEPARTMENT OF COMPUTER SCIENCE
Total Marks: 10
Obtained Marks:
AI
LAB TASK
Submitted To: Ma’am Maria Bibi
Student Name: Umair Ali
Registration Number: 2312185
CNDC BS(CS)-6B SZABIST-ISB
Shaheed Zulfikar Ali Bhutto Institute of Science & Technology University
DEPARTMENT OF COMPUTER SCIENCE
Instructions: Copied Lab Task will be marked zero. Late submissions are not entertained in any
case.
Question : 01
A school wants to categorize students into three groups: High Performers, Average Performers, and Low
Performers. The rule is simple: if a student has an exam score of 80 or above and at least 75% attendance, they
are considered High Performers. If the score falls between 50 and 79 and the attendance is at least 60%, they
are classified as Average Performers. All other students are placed in the Low Performers group. Your task is
to write a Python program that processes the data of at least ten students and classifies them according to these
rules.
Question : 02
2. A hospital maintains patient data including blood pressure and cholesterol levels. The doctor wants to create
a simple classification system. If a patient’s blood pressure is greater than 140 and their cholesterol level is
above 200, they should be marked as High Risk. If the blood pressure lies between 120 and 140, or cholesterol
is between 180 and 200, the patient should be classified as Medium Risk. All others can be considered Low
Risk. You are required to build a Python program that takes in health records and classifies each patient into
one of these categories.
CNDC BS(CS)-6B SZABIST-ISB
Shaheed Zulfikar Ali Bhutto Institute of Science & Technology University
Question : 03
A bank monitors its customer transactions and wants to flag unusual activities. If a transaction amount
exceeds $5000 and takes place in a location different from the customer’s home city, it should be labeled as
Fraud. If the transaction is between $1000 and $5000 with a location mismatch, it is classified as Suspicious.
All other transactions are considered Safe. Write a classification program that analyzes at least eight
transactions and categorizes them accordingly.
CNDC BS(CS)-6B SZABIST-ISB
Shaheed Zulfikar Ali Bhutto Institute of Science & Technology University
Question : 04
An online shopping platform wants to classify customer feedback into three categories: Positive, Negative, or
Neutral. Reviews that contain words like “good”, “excellent”, “satisfied”, or “happy” should be marked
Positive. Reviews with terms such as “bad”, “poor”, “angry”, or “disappointed” should be marked Negative. If
a review does not contain any of these words, it will be classified as Neutral. Your task is to create a Python
program that reads a list of at least six customer reviews and assigns them to the correct category.
CNDC BS(CS)-6B SZABIST-ISB
Shaheed Zulfikar Ali Bhutto Institute of Science & Technology University
Question : 05
A cybersecurity team is developing a simple filter to classify emails. If the email contains suspicious terms
such as “password”, “bank”, “login”, or “verify account”, it should be marked as Phishing. Emails that come
from trusted domains like @[Link] or @[Link] should be considered Safe. All others can be
placed in the Unknown category. Write a program that checks at least ten email records and classifies them
into one of these three groups.
CNDC BS(CS)-6B SZABIST-ISB