Create a program studentDatabase(numStudents) that allows user to specify the number of students with numStudents to input
Question:
Create a program studentDatabase(numStudents) that allows user to specify the number of students with numStudents to input ID numbers and names and stores the information using the dictionary data structure. Then, it allows the user to look up a student by their ID number. The program should gracefully exit when the user enters a blank.
Sample Output:
>>> studentDatabase(3)
>>> Enter id of a new student: 1000
>>> Enter name of the new student: John Garcia
>>> Enter id of a new student: 2000
>>> Enter name of the new student: Lily Lane
>>> Enter id of a new student: 3000
>>> Enter name of the new student: Maria Lee
>>> Enter id to look up: 1000
John Garcia
>>> Enter id to look up: 2000
Lily Lane
>>> Enter id to look up:
Have a good day!
>>> |
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell