Console Based Python Application Topics
Topic-1: BMI Calculator
Body Mass Index (BMI) is a numerical value used to assess whether a person has a healthy
body weight for a given height. It is commonly used in healthcare, fitness applications,
and medical screenings. A BMI Calculator is a console-based real-time application that
takes a person’s height and weight as input and determines their health category.
The BMI Calculator is used to:
Identify whether a person is underweight, normal, overweight, or obese
Assist in basic health awareness
Demonstrate the use of conditional logic in programming
Apply real-world formulas using Python
Constraints
Height must be greater than 0
Weight must be greater than 0
BMI value should be calculated using float precision
Topic-2: Parking Fee Calculator
A Parking Fee Calculator is a real-time application used in malls, hospitals, offices,
railway stations, and airports to calculate parking charges based on the duration for which
a vehicle is parked. This console-based Python program calculates the total parking fee
using simple rules and basic programming concepts. The Parking Fee Calculator is designed
to:
Calculate parking charges based on number of hours parked
Demonstrate the use of conditional statements
Apply real-life billing logic in programming
Strengthen understanding of loops, arithmetic operations, and input handling
Parking Fee Rules (Example Guidelines)
Parking Duration Charges
First 1 hour ₹30
Each additional hour or part there of ₹20 per hour
Maximum charge per day ₹200
Topic-3: Spiral Printing and ZigZag of a Square Matrix
a) Spiral printing of a matrix means displaying the elements of a matrix in a clockwise
spiral order, starting from the top-left corner and moving inward layer by layer.
Input Matrix
1 2 3
4 5 6
7 8 9
Output
123698745
b) Zig-zag printing of a matrix means printing the elements of a matrix row by row, but
alternating the direction of printing:
Even-numbered rows → Left to Right
Odd-numbered rows → Right to Left
This pattern looks like a zig-zag movement, hence the name.
Input
1 2 3
4 5 6
7 8 9
Output
123654789
147852369
Topic-4: Digital Calculator with Multiple Conversions.
Design a console-based Digital Calculator in Python that allows the user to perform
different types of numerical and unit conversions based on their choice.
The program should display a menu of conversion options, accept the user’s choice, take the
required input value, perform the selected conversion, and display the result.
Conversion Options
1. Decimal to Binary
2. Decimal to Octal
3. Decimal to Hexadecimal
4. Celsius to Fahrenheit
5. Fahrenheit to Celsius
6. Kilometers to Meters
7. Meters to Kilometers
8. Seconds to Minutes and Seconds
Constraints
User choice must be between 1 and 8
Input values must be non-negative
Program should use basic Python constructs only
Example 1
Input
Choice: 1
Value: 10
Output
Binary value: 1010
Topic-5: Income Tax Calculation with Income Heads, Deductions, Surcharge, and Cess.
Design a console-based Python program to calculate the final income tax payable by an
individual by considering:
1. All major heads of income
2. Eligible deductions under different sections
3. Income tax slabs
4. Surcharge (if applicable)
5. Health and Education Cess
The program should compute the gross total income, apply deductions, determine the
taxable income, calculate basic tax, add surcharge, apply cess, and finally display the total
tax payable.
Income Heads to be Considered
1. Income from Salary
2. Income from House Property
3. Income from Business or Profession
4. Income from Capital Gains
5. Income from Other Sources
Deductions to be Considered (Simplified)
Maximum Limit
Section Description
(₹)
80C LIC, PPF, ELSS, etc. 1,50,000
80D Medical Insurance 25,000
80E Education Loan Interest Actual Amount
80TTA Savings Account Interest 10,000
Income Tax Slabs (Simplified)
Taxable Income (₹) Tax Rate
Up to 2,50,000 0%
2,50,001 – 5,00,000 5%
5,00,001 – 10,00,000 20%
Above 10,00,000 30%
Surcharge Rates
Taxable Income (₹) Surcharge
Up to 50,00,000 Nil
50,00,001 – 1,00,00,000 10% of income tax
Above 1,00,00,000 15% of income tax
Health & Education Cess
4% of (Income Tax + Surcharge)
Input
Income amounts under each income head
Deduction amounts under each applicable section
Output
Gross Total Income
Total Deductions
Taxable Income
Basic Income Tax
Surcharge Amount
Health & Education Cess
Final Tax Payable
Constraints
All inputs must be non-negative
Deductions must not exceed prescribed limits
Ignore rebates and exemptions
Use basic arithmetic and conditional logic
Example 1
Input
Salary Income: 600000
House Property Income: 100000
Business Income: 0
Capital Gains: 50000
Other Sources: 20000
80C: 150000
80D: 20000
80E: 0
80TTA: 8000
Topic 6:
Advanced Online E-Commerce Order Processing and Billing System
Description
Design a console-based Python program that simulates an online e-commerce platform
from product selection to final checkout.
The system must calculate the final payable amount by considering multiple business rules,
conditions, and constraints similar to real-world e-commerce applications.
Product Catalog
Price
Product ID Product Name Category Stock
(₹)
101 Mobile Phone Electronics 15,000 10
102 Laptop Electronics 55,000 5
103 Headphones Accessories 2,000 20
104 Smart Watch Wearable 3,000 15
105 Keyboard Accessories 1,000 25
Purchase Conditions
1. Quantity ordered must not exceed available stock
2. Minimum quantity allowed per product is 1
3. Maximum quantity allowed per product is 5
4. Same product can be ordered only once per transaction
Discount Rules
Order Value Discount
Order Amount
Discount
(₹)
Below 10,000 No Discount
Order Amount
Discount
(₹)
10,000 – 49,999 10%
50,000 and above 20%
Category-Based Discount
Accessories → Extra 5% discount
Maximum total discount allowed → 25%
Coupon Code Rules
Coupon Code Condition Benefit
SAVE100 Order ≥ ₹5,000 Flat ₹100 off
Order ≥
FESTIVE20 Extra 5% off
₹20,000
FREESHIP Order ≥ ₹3,000 Free Delivery
Only one coupon code can be applied per order.
GST Rules
Category GST Rate
Electronics 18%
Wearable 12%
Accessories 5%
GST is calculated after discount and coupon deduction.
Delivery Charges
Final Order Value
Delivery Charge
(₹)
Below 3,000 ₹120
3,000 – 9,999 ₹60
10,000 and above Free
Payment Method Charges
Payment Method Additional Condition Charge
UPI — No charge
Debit Card — No charge
Credit Card Order ≥ ₹10,000 2%
Cash on Delivery Order < ₹50,000 ₹75
User Validation Rules
1. Invalid product ID should be rejected
2. Invalid coupon code should be ignored
3. Negative values are not allowed
4. Order should be cancelled if final payable amount is zero or negative
Input
Product IDs with quantities
Coupon code (optional)
Payment method
Output
Item-wise price breakdown
Stock validation result
Total order amount
Discounts applied
Coupon deduction
GST (category-wise)
Delivery charge
Payment method charge
Final payable amount
Constraints
Use basic Python concepts only
Do not use databases or files
Use conditional statements and loops
Round final amount to 2 decimal places
Example 1
Input
Products:
Mobile Phone × 1
Headphones × 2
Coupon Code: SAVE100
Payment Method: UPI
Output
Order Amount: ₹19000
Order Discount: ₹1900
Category Discount: ₹100
Coupon Discount: ₹100
GST: ₹2766
Delivery Charge: ₹0
Payment Charge: ₹0
Final Payable Amount: ₹19766
Topic 7 :
Student Academic Performance Management Using Python Dictionary
Problem statement
Create a Python program that manages student academic records using dictionaries. The
program should allow users to:
1. Add student records with subject-wise grades.
2. Update student grades.
3. Delete student records.
4. Display summary reports for all students.
5. Find the top-performing student overall.
6. Find the top student in a specific subject.
All student information should be stored using nested dictionaries, where each student has a
unique roll number, a name, and grades for multiple subjects.
Data Structure
student = {
"roll_no": 101, # Unique integer
"name": "Rakesh", # String
"grades": { # Dictionary of subject: grade
"Math": 85,
"Physics": 78,
"English": 92
}
}
All students are stored in a list of dictionaries:
students = [student1, student2, ...]
Constraints
1. Roll numbers must be unique positive integers.
2. Each student must have at least 3 subjects and at most 8 subjects.
3. Grades must be integers between 0 and 100.
4. Maximum 50 students can be stored.
5. Updating grades requires the subject to exist for that student.
6. Deleting requires a valid roll number.
7. If multiple students have the same highest average, display all of them.
8. Negative values are not allowed.
Input / Output
Adding Students
Input
Add Student:
Name: Rakesh
Roll No: 101
Grades: {"Math": 85, "Physics": 78, "English": 92}
Add Student:
Name: Priya
Roll No: 102
Grades: {"Math": 90, "Physics": 82, "English": 88}
Output
Student Summary Report:
Roll No: 101, Name: Rakesh, Grades: {'Math': 85, 'Physics':
78, 'English': 92}, Average: 85.0
Roll No: 102, Name: Priya, Grades: {'Math': 90, 'Physics': 82,
'English': 88}, Average: 86.7
Top-Performing Student Overall: Priya (Average: 86.7)
Updating Grades
Input
Roll No: 101
Subject: Physics
New Grade: 80
Output
Updated Grades for Roll No 101:
{'Math': 85, 'Physics': 80, 'English': 92}
Deleting a Student
Input
Roll No: 102
Output
Student with Roll No 102 deleted successfully.
Finding Top Student in a Subject
Input
Subject: Math
Output
Top Student in Math: Priya (Grade: 90)
Invalid Input Example
Input
Add Student:
Roll No: 101
Output
Error - Roll number already exists.
Topic 8 :
Inventory Management System Using Python Dictionary
Problem Statement
Design a console-based Python program to manage a store inventory using dictionaries.
The system should allow the user to:
1. Add new products to inventory.
2. Update product details (price, quantity).
3. Delete products from inventory.
4. Search for a product by name or product ID.
5. Display a summary report of all products.
6. Calculate the total inventory value (sum of price × quantity for all
products).
All product information should be stored using Python dictionaries, and the inventory can
be stored as a dictionary of dictionaries, with product ID as key.
Data Structure
inventory = {
101: {
"name": "Mobile Phone",
"category": "Electronics",
"price": 15000,
"quantity": 10
},
102: {
"name": "Laptop",
"category": "Electronics",
"price": 55000,
"quantity": 5
}
}
Constraints
1. Product ID must be unique and positive.
2. Product name should be a non-empty string.
3. Price must be a positive integer.
4. Quantity must be a non-negative integer.
5. Maximum products allowed: 100.
6. Updating requires a valid product ID.
7. Deleting requires a valid product ID.
8. Searching can be done by product ID or name.
9. Total inventory value must be calculated correctly using price × quantity.
10. System should handle invalid input gracefully.
Operations / Input
1. Add Product
o Input: Product ID, Name, Category, Price, Quantity
o Output: Confirmation of product addition
2. Update Product
o Input: Product ID, New Price, New Quantity
o Output: Updated product details
3. Delete Product
o Input: Product ID
o Output: Confirmation of deletion
4. Search Product
o Input: Product ID or Name
o Output: Product details
5. Display Summary Report
o Output: List of all products with ID, Name, Category, Price, Quantity
6. Calculate Total Inventory Value
o Output: Sum of price × quantity for all products
Example 1 – Adding Products
Input
Add Product:
ID: 101
Name: Mobile Phone
Category: Electronics
Price: 15000
Quantity: 10
Add Product:
ID: 102
Name: Laptop
Category: Electronics
Price: 55000
Quantity: 5
Output
Product 101 added successfully.
Product 102 added successfully.
Topic 9 :
Problem Statement
Bank Account Management System Using Python Dictionary
Description
Design a console-based Python program to manage bank accounts using Python
dictionaries.
The system should allow a bank to manage multiple accounts, perform transactions, and
track balances. Users (bank staff or customers) should be able to:
1. Create new accounts
2. Update account details
3. Deposit money
4. Withdraw money
5. Check balance
6. Transfer money between accounts
7. Display a summary of all accounts
All account information should be stored using nested dictionaries, where each account has
a unique account number, customer name, account type, and balance.
Data Structure
Each bank account is represented as a dictionary:
account = {
"account_no": 101,
"name": "Rakesh Verma",
"account_type": "Savings", # Savings / Current
"balance": 50000
}
All accounts are stored in a dictionary of dictionaries, using account number as the key:
bank_accounts = {
101: {"name": "Rakesh Verma", "account_type": "Savings",
"balance": 50000},
102: {"name": "Priya Sharma", "account_type": "Current",
"balance": 75000}
}
Constraints / Business Rules
1. Account Number: Must be unique positive integer.
2. Name: Must be a non-empty string.
3. Account Type: Only "Savings" or "Current" allowed.
4. Minimum Balance:
o Savings: ₹1,000
o Current: ₹5,000
5. Deposit Amount: Must be positive integer.
6. Withdrawal Amount: Cannot exceed current balance minus minimum balance.
7. Money Transfer: Cannot transfer more than available balance minus minimum
balance.
8. Maximum Accounts: 100 accounts can be created.
9. Invalid Inputs: Negative amounts, invalid account numbers, or invalid account types
should be rejected.
10. Display: All monetary values must be rounded to 2 decimal places.
Operations / Input
1. Create Account
o Input: Account Number, Name, Account Type, Initial Deposit
o Output: Confirmation message
2. Update Account
o Input: Account Number, New Name, New Account Type
o Output: Updated account details
3. Deposit Money
o Input: Account Number, Deposit Amount
o Output: Updated Balance
4. Withdraw Money
o Input: Account Number, Withdrawal Amount
o Output: Updated Balance or Error if insufficient balance
5. Check Balance
o Input: Account Number
o Output: Current Balance
6. Transfer Money
o Input: Source Account Number, Target Account Number, Amount
o Output: Updated Balances or Error if insufficient balance
7. Display Summary Report
o Output: List all accounts with Account No, Name, Type, Balance
Example 1 – Create Accounts
Input
Create Account:
Account No: 101
Name: Rakesh Verma
Account Type: Savings
Initial Deposit: 20000
Create Account:
Account No: 102
Name: Priya Sharma
Account Type: Current
Initial Deposit: 50000
Output
Account 101 created successfully.
Account 102 created successfully.
Example 2 – Deposit Money
Input
Deposit:
Account No: 101
Amount: 5000
Output
Deposit successful. Updated Balance: ₹25000
Example 3 – Withdraw Money
Input
Withdraw:
Account No: 102
Amount: 48000
Output
Error: Insufficient balance. Minimum balance ₹5000 must be
maintained.
Topic 10 :
Problem Statement
College Attendance Tracker Using Python Dictionary
Description
Design a console-based Python program to manage student attendance in a college using
Python dictionaries.
The system should allow:
1. Adding student records with subject-wise attendance.
2. Updating attendance for individual subjects.
3. Deleting student records.
4. Calculating attendance percentage per student.
5. Identifying students with low attendance (e.g., below 75%).
6. Generating a complete attendance report.
This simulates a real-life college attendance management system.
2. Data Structure
Each student is represented as a dictionary:
student = {
"student_id": 101, # Unique integer
"name": "Rakesh Verma", # String
"class": "CS101", # Class/Section
"attendance": { # Subject-wise days attended
"Math": 20,
"Physics": 18,
"English": 22
}
}
All students are stored in a list of dictionaries:
students = [student1, student2, ...]
Additionally, the total number of classes conducted per subject should be stored in a
dictionary:
total_classes = {
"Math": 25,
"Physics": 25,
"English": 25
}
3. Functional Requirements
1. Add Student Record
o Input: Student ID, Name, Class, Subject-wise attendance
o Output: Confirmation of record addition
2. Update Attendance
o Input: Student ID, Subject, New Attendance
o Output: Updated attendance record
3. Delete Student Record
o Input: Student ID
o Output: Confirmation of deletion
4. Calculate Attendance Percentage
o For each subject: (Days Attended / Total Classes) × 100
o Overall attendance = Average of all subjects
5. Identify Low Attendance Students
o Students with overall attendance < 75%
o Output: List of student IDs and names
6. Display Attendance Report
o Output: Student ID, Name, Class, Subject-wise attendance, Overall percentage
4. Constraints
1. Student ID: Must be unique positive integer.
2. Attendance: Must be ≤ total classes conducted for that subject.
3. Minimum Subjects: Each student must have at least 3 subjects.
4. Maximum Subjects: Maximum 8 subjects per student.
5. Negative Values: Not allowed for attendance or student ID.
6. Maximum Students: System should handle up to 100 students.
7. Validation:
o Updating attendance requires existing student and subject
o Deleting requires valid student ID
o Adding a student with duplicate ID is not allowed
8. Rounding: Attendance percentages should be rounded to 2 decimal places.
Example 1 – Adding Students
Input
Add Student:
ID: 101
Name: Rakesh Verma
Class: CS101
Attendance: {"Math": 20, "Physics": 18, "English": 22}
Add Student:
ID: 102
Name: Priya Sharma
Class: CS101
Attendance: {"Math": 22, "Physics": 20, "English": 23}
Output
Student 101 added successfully.
Student 102 added successfully.
Example 2 – Update Attendance
Input
Update Attendance:
Student ID: 101
Subject: Physics
New Attendance: 21
Output
Attendance updated for Student 101:
{'Math': 20, 'Physics': 21, 'English': 22}
Example 3 – Calculate Attendance Percentage
Input
Calculate Attendance Percentage:
Student ID: 101
Output
Math: 80.0%
Physics: 84.0%
English: 88.0%
Overall Attendance: 84.0%
Example 4 – Identify Low Attendance Students
Input
Threshold: 75%
Output
Students with low attendance:
Student ID: 103, Name: Rahul Verma, Overall Attendance: 72.5%
Student ID: 105, Name: Simran Kaur, Overall Attendance: 70.0%