0% found this document useful (0 votes)
12 views

Python Chapter 1-3 Test (28th Jan,25)- Ur Engineering Friend_31646169

The document is a test paper for a Python course covering chapters 1-3, dated January 28, 2025, with a total of 100 marks and a passing requirement of 80 marks. It includes a series of programming tasks that require students to write Python programs for various real-world applications, such as a discount system, bus ticket booking, ATM simulation, and more. Instructions emphasize the importance of staying calm, reading questions carefully, and reviewing answers before submission.

Uploaded by

Aditi Kotkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Python Chapter 1-3 Test (28th Jan,25)- Ur Engineering Friend_31646169

The document is a test paper for a Python course covering chapters 1-3, dated January 28, 2025, with a total of 100 marks and a passing requirement of 80 marks. It includes a series of programming tasks that require students to write Python programs for various real-world applications, such as a discount system, bus ticket booking, ATM simulation, and more. Instructions emphasize the importance of staying calm, reading questions carefully, and reviewing answers before submission.

Uploaded by

Aditi Kotkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Ur Engineering Friend

Test Paper

Subject -: Python ( Chapter 1-3 ) Date -: 28-01-2025


Total Marks -: 100 ( 5 x 20 ) Passing Marks -: 80

Instructions -:

Dear Future MSBTE Topper,

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:

1. Stay Cool, Code On!

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!

3. Read the Questions Carefully (Yes, All of Them).

Some questions love to hide hints in plain sight. Channel your inner detective and find them!

4. Time is Money, Spend It Wisely.

Keep an eye on the clock. Your answers are precious, but they don’t need a novel’s worth of words.

5. Guess Like a Genius!

If you’re unsure, make an educated guess. Random answers are like buggy code—might work, might
not.

6. Check Before You Submit.

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!

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend


1. Dynamic Discount System for Shopping Mall

A shopping mall offers discounts based on the total purchase amount:

 No discount for purchases below ₹1000.


 10% discount for purchases between ₹1000 and ₹5000.
 20% discount for purchases above ₹5000.

Write a Python program that:

 Accepts the number of items a customer buys.


 For each item, take the item's price as input.
 Calculate the total purchase amount and apply the appropriate discount.
 Display the discounted amount and the final price to be paid.

2. Smart Bus Ticket Booking System

A bus ticket booking system charges fares based on age and distance traveled:

 Children (below 12): ₹2 per km.


 Adults (12 to 60): ₹5 per km.
 Senior Citizens (above 60): ₹3 per km.

Write a Python program that:

 Takes inputs for the number of passengers.


 For each passenger, input their age and distance to travel.
 Calculate and display the total fare for all passengers.

3. ATM Pin Validation and Withdrawal

Simulate an ATM system:

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend


 A user has 3 attempts to enter the correct 4-digit PIN (e.g., 1234).
 After 3 failed attempts, lock the account and display a message.
 If the PIN is correct, ask the user for a withdrawal amount.

o Ensure the withdrawal amount is a multiple of ₹100 and does not exceed ₹20,000 or
the available balance (e.g., ₹50,000).

Display the remaining balance after a successful transaction.

4. Parking Lot Fee Calculator

A parking lot charges fees based on the number of hours a vehicle is parked:

 ₹20 for the first hour.


 ₹10 for each additional hour up to 5 hours.
 ₹5 for every hour beyond 5 hours.

Write a Python program that:

 Takes the number of vehicles as input.


 For each vehicle, input the hours it was parked.
 Calculate and display the parking fee for each vehicle and the total revenue for the day.

5. Fitness Challenge Tracker

A fitness challenge encourages participants to complete a specific number of exercises daily:

 Push-ups: 50
 Squats: 30
 Jumping Jacks: 20

Write a Python program that:

 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.

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend


 Calculate the percentage of the challenge completed for each exercise and overall.
 If the participant completes 100% of the challenge for all days, display a congratulatory
message. Otherwise, show areas where they fell short.

6. Grade Predictor

A student wants to predict their grade based on internal assessments. Write a Python program
that:

1. Takes inputs for marks obtained in 3 internal tests and 2 assignments.


2. Calculates the weighted average where:
1. Each test carries 20% weight.
2. Each assignment carries 10% weight.
3. Predicts the grade using the following scale:

1. A: 80-100
2. B: 60-79
3. C: 40-59
4. F: Below 40

7. Study Group Organizer

A class wants to form study groups for an upcoming exam. Write a Python program that:

1. Accepts the total number of students and their names as input.


2. Forms groups of 4 students each (use lists).
3. Displays each group. If there are extra students who cannot form a group of 4, display them
as a separate smaller group.

8. Library Fine Calculator

A college library charges fines for overdue books. Write a Python program that:

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend


1. Takes inputs for the actual return date and the due date of a book (use dd-mm-yyyy format).
2. Calculates the fine based on the following rules:

1. ₹2 per day for up to 5 days late.


2. ₹5 per day for 6 to 10 days late.
3. ₹10 per day for more than 10 days late.

3. Displays the total fine.

9. Event Participation Tracker

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:

1. Each student’s registered events.


2. The total number of participants in each event.
3. The event with the highest participation.

10. Cafeteria Bill Generator

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.

11. Hostel Room Allocation

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend


A college hostel has rooms available, and each room accommodates 2 students. Write a
Python program that:

1. Accepts a list of students who have applied for hostel accommodation.


2. Allocates rooms (2 students per room) and displays the room allocations.
3. If there are any students left without a roommate, display their names as “Pending
Allocation.”

12. Exam Seating Arrangement

A professor wants to arrange students in an exam hall to avoid cheating. Write a Python
program that:

1. Accepts a list of student roll numbers and their departments.


2. Arranges them alternately based on their departments (e.g., roll numbers from CS, IT, and EC
should not sit next to each other).
3. Displays the final seating arrangement.

13. Gift Tracker (Dictionaries)

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!

14. Loyalty Check (Sets)

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend


A girlfriend suspects her boyfriend might be using common pickup lines. Write a Python
program that:

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:

1. Pickup lines that are original (not in the common set).


2. Pickup lines that are stolen (present in the common set).

15. Ghost Name Finder (Strings & Loops)

A haunted house is filled with ghosts, and each ghost has a name that must be decoded. Write
a Python program that:

1. Takes a ghost's encoded name as input (e.g., "Gh!o$s@t%").


2. Removes all special characters and digits to reveal the true ghost name (e.g., "Ghost").
3. If the name starts with the letter "B", displays a message like:
1. "This ghost is friendly!"
Otherwise, display:
2. "Run for your life!"

16. Expense Splitter (Lists & Loops)

You and your friends are on a trip to Goa and need to split expenses equally. Write a Python
program that:

1. Takes the names of 5 friends as a list.


2. Accepts the individual contribution of each friend.
3. Calculates the total expense and the amount each friend needs to pay or receive (if they
overpaid or underpaid).
4. Displays a summary for each friend.

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend


17. Witch’s Spellbook (Sets & Loops)

A witch is creating a spell and needs ingredients. Write a Python program that:

1. Stores the ingredients she already has in a set.


2. Takes inputs for ingredients she wants to add.
3. Displays:
1. Ingredients that are newly added (not already in the set).
2. Ingredients that were already present (intersection).
4. If the ingredient "frog legs" is added, display: "The spell is ruined!" and stop taking further
inputs.

18. Anniversary Reminder System (Sets and Dictionaries)

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).

19. Apology Calculator (Strings & Loops)

Best friends had a fight, and one of them is trying to apologize. Write a Python program that:

1. Takes the apology message (e.g., "I am sorry!") as input.


2. Calculates how many times the message needs to be repeated to convince the other friend
(based on a minimum length of 50 characters).
3. Displays the repeated message.

20. Fight Analyzer (Sets)

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend


Two best friends had a fight and are accusing each other of saying mean things. 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.

--- Thank You ---

www.urengineeringfriend.in YOUTUBE CHANNEL – Ur Engineering Friend

You might also like