Page 236 - Information_Practice_Fliipbook_Class11
P. 236
print("Student not found.")
elif choice == 3:
# Display details of all students
print("\nAll Student Details:")
for roll, details in studentsDict.items():
print(f"Roll Number: {roll}, Name: {details['Name']}, Percentage:
{details['Percentage']}")
elif choice == 4:
# Find and display the topper among students
if not studentsDict:
print("No students in the list.")
else:
topper = max(studentsDict, key=lambda roll: studentsDict[roll]['Percentage'])
print(f"The topper is: Roll Number {topper}, Name: {studentsDict[topper]['Name']},
Percentage: {studentsDict[topper]['Percentage']}")
elif choice == 5:
# Find and display subject toppers
if not studentsDict:
print("No students in the list.")
else:
# Assuming the subjects are named 'Subject1', 'Subject2', etc.
subjects = [f"Subject{i}" for i in range(1, 4)] # Assuming 3 subjects
for subject in subjects:
subjectTopper = max(studentsDict, key=lambda roll: studentsDict[roll][subject]
if subject in studentsDict[roll] else 0)
print(f"The topper in {subject} is: Roll Number {subjectTopper},
Name: {studentsDict[subjectTopper]['Name']}, Percentage:
{studentsDict[subjectTopper]['Percentage']}")
elif choice == 6:
print("Exiting the program.")
break
else:
print("Invalid choice. Please enter a number between 1 and 6.")
Case Study
1. A bank is a financial institution which is involved in borrowing and lending of money. With advancement in technology, online banking,
also known as internet banking allows customers of a bank to conduct a range of financial transactions through the bank’s website
anytime, anywhere. As part of initial investigation you are suggested to:
• Collect a Bank’s application form. After careful analysis of the form, identify the information required for opening a savings account.
Also enquire about the rate of interest offered for a savings account.
• The basic two operations performed on an account are Deposit and Withdrawal. Write a menu driven program that accepts either of
the two choices of Deposit and Withdrawal, then accepts an amount, performs the transaction and accordingly displays the balance.
Remember every bank has a requirement of minimum balance which needs to be taken care of during withdrawal operations.
• Enquire about the minimum balance required in your bank.
• Collect the interest rates for opening a fixed deposit in various slabs in a savings bank account. Remembers rate may be different for
senior citizens.
Finally, write a menu driven program having the following options (use functions and appropriate data types):
• Open a savings bank account
222 Touchpad Informatics Practices-XI

