Page 454 - ComputerScience_Class_11
P. 454
E. Case study-based questions.
Student Course Management System
A school is developing a Python-based Student Course Management System. The system needs to track the following details for each
student:
• Student Name
• List of Courses the student is enrolled in
• Number of Courses the student is enrolled in
The system should store this information in a list for each student. The main list will contain multiple students and each student’s
details will be stored as a sublist.
Based on the given case, answer the following questions:
1. How does the list help in managing student data?
2. How is a student's data structured using lists in the system?
3. Why is it important that a list in Python is mutable when managing student data?
4. How can the system use the list to track the number of courses each student is enrolled in?
F. Write the Python program for the following:
1. Write a program to display five integer numbers in a list and print the list.
2. Write a program to create a tuple of four subjects and print the first subject using indexing.
3. Write a program to create a dictionary with keys id and salary and print the salary value.
G. Find the output of the following programs:
1. # Assigning a string value to variable city and Country
country = "India"
city = "Jaipur"
# Printing the country and city name
print("Country and City Name:", country, city)
2. # a nested list of students and their marks
students = [["Amit", 85], ["Riya", 90], ["Karan", 78]]
# Printing the nested list
print("Student Data:", students)
# Printing the first student's data
print("First Student:", students[0])
3. #Create a set of colors
colors = {"Red", "Green", "Blue", "Yellow"}
# Printing the set
print("Colors:", colors)
# Creating another set of numbers
numbers = {10, 20, 30, 40}
# Printing the numbers set
print("Numbers:", numbers)
452 Touchpad Computer Science (Ver. 3.0)-XI

