#Author: James Tam #Version: October 21, 2024 students = {111:"James Tam,business,computer science", 250:"Jim Tam(Ace student,undeclared", 117:"Scott Bruce,business"} print("All students: whole dictionary") print("\t", students) input("press enter") studentID = 111 print("\nOne student %d" %(studentID)) print(students[studentID]) print("\n\tNumber of students %d" %(len(students))) #JT: unless the keys are following a fixed sequence a while-loop can't be used. #Recall: need to retrieve data via the keys not through an index from zero to (size-1) print("\nAll students: one student at a time") for aStudentID in students: print("\t%d: %s" %(aStudentID,students[aStudentID]))