ASSIGNMENT
Q.23
Q 23.Write a Python program to create a dictionary to store a student’s information like Accept the following details: Roll Number Name Course Semester Percentage Store the details in a dictionary. Display all the student information.
Display all keys and all values separately.
# Program to create a dictionary to store student's information student = {} # Accept student details student["Roll Number"] = input("Enter Roll Number: ") student["Name"] = input("Enter Name: ") student["Course"] = input("Enter Course: ") student["Semester"] = input("Enter Semester: ") student["Percentage"] = float(input("Enter Percentage: ")) # Display all student information print("\n========== STUDENT INFORMATION ==========") for key, value in student.items(): print(key, ":", value) # Display all keys print("\nAll Keys:") print(student.keys()) # Display all values print("\nAll Values:") print(student.values())


