Python Chapter 1-3 Test (28th Jan,25)- Ur Engineering Friend_31646169
Python Chapter 1-3 Test (28th Jan,25)- Ur Engineering Friend_31646169
Test Paper
Instructions -:
Today’s test is not just a test; it’s a battle between you and the questions. And guess what? The questions are
rooting for you too (but they won’t make it easy).
Before you start flexing your brain muscles, here are some golden rules to follow:
Panicking is like writing infinite loops—it doesn’t help. Take a deep breath, and let your logical mind
shine!
2. No Telepathy Allowed.
Talking to your neighbours is cute but not helpful here. Let’s keep the answers coming from your
brilliant mind only!
Some questions love to hide hints in plain sight. Channel your inner detective and find them!
Keep an eye on the clock. Your answers are precious, but they don’t need a novel’s worth of words.
If you’re unsure, make an educated guess. Random answers are like buggy code—might work, might
not.
A missed semicolon in code hurts; so does a missed question. Review your paper before handing it over.
Remember: This test isn’t about knowing everything; it’s about giving your best shot. You’re here because
you’re capable, so trust yourself and ace it!
A bus ticket booking system charges fares based on age and distance traveled:
o Ensure the withdrawal amount is a multiple of ₹100 and does not exceed ₹20,000 or
the available balance (e.g., ₹50,000).
A parking lot charges fees based on the number of hours a vehicle is parked:
Push-ups: 50
Squats: 30
Jumping Jacks: 20
Takes inputs for the number of days a participant has completed the challenge.
For each day, input the number of push-ups, squats, and jumping jacks they completed.
6. Grade Predictor
A student wants to predict their grade based on internal assessments. Write a Python program
that:
1. A: 80-100
2. B: 60-79
3. C: 40-59
4. F: Below 40
A class wants to form study groups for an upcoming exam. Write a Python program that:
A college library charges fines for overdue books. Write a Python program that:
A college is organizing a technical event where students can participate in multiple activities.
Write a Python program that:
1. Accepts the names of students and the events they wish to participate in (store as a
dictionary where the key is the student’s name and the value is a list of events).
2. Displays:
The college cafeteria wants an automated billing system. Write a Python program that:
1. Displays a menu of available items (e.g., Sandwich: ₹50, Coffee: ₹30, Fries: ₹40).
2. Allows a student to order multiple items by entering the item name and quantity.
3. Calculates and displays the total bill with a 10% discount if the bill exceeds ₹200.
A professor wants to arrange students in an exam hall to avoid cheating. Write a Python
program that:
A boyfriend wants to remember all the gifts his girlfriend mentioned wanting for her birthday.
Write a Python program that:
1. Allows the girlfriend to suggest up to 5 gift ideas (store these as key-value pairs where the
key is the gift name and the value is its approximate price).
2. Calculates and displays:
1. The most expensive and least expensive gifts.
2. The total estimated cost of all gifts.
3. Suggests whether he should stick to the budget of ₹5000 or start saving more!
1. Stores a set of common pickup lines (e.g., “Did it hurt when you fell from heaven?”, “Are you
a magician?”).
2. Accepts 5 lines the boyfriend has used recently.
3. Compares the two sets and displays:
A haunted house is filled with ghosts, and each ghost has a name that must be decoded. Write
a Python program that:
You and your friends are on a trip to Goa and need to split expenses equally. Write a Python
program that:
A witch is creating a spell and needs ingredients. Write a Python program that:
The boyfriend wants to remember all important dates to avoid getting in trouble. Write a
Python program that:
1. Stores a dictionary of special dates (e.g., anniversary, her birthday, Valentine’s Day) with their
respective months.
2. Takes a set of dates he remembered this year.
3. Displays:
1. Dates he forgot (difference).
2. Dates he remembered correctly (intersection).
3. A reminder for upcoming dates (those not yet in the current month).
Best friends had a fight, and one of them is trying to apologize. Write a Python program that:
1. Takes two sets of words used by each friend during the fight.
2. Displays:
1. Words that both friends used (intersection).
2. Words that only one of them used (symmetric difference).
3. A message like "You both need to chill!" if they used more than 5 common words.