This program will allow the user to run it as many time as desired, use a sentinel to stop the program. Write a program that creates a dictionary containing course numbers and the room numbers of the rooms where the courses meet. The dictionary should have the following key value pairs: CS101                        3004 CS102                        4501 CS103                        6755 NT110                        1244 CM241                       1411 The program should also create a dictionary containing course numbers and the names of the instructors that teach each course. The dictionary should have the following key-value CS101                         Haynes CS102                         Alvarado CS103                         Rich NT110                         Burke CM241                        Lee The program should also create a dictionary containing course numbers and the meeting times of each course. The dictionary should have the following key-value pairs: CS101                        8:00 a.m. CS102                        9:00 a.m. CS103                        10:00 a.m. NT110                        11:00 a.m. CM241                       1:00 p.m. The program should let the user enter a course number, and then it should display the course’s room number, instructor, and meeting time. We will then design and implement the algorithm that provides the opportunity for a user to enter a course number, and then it should display the course’s room number, instructor, and meeting time using the set of dictionaries that we loaded.

In this program, we are tasked with creating a dictionary using Python that contains information about various courses. The information includes course numbers, room numbers, instructors, and meeting times.

To begin, we need to create three dictionaries: one for course numbers and room numbers, another for course numbers and instructors, and a third one for course numbers and meeting times. Let’s call these dictionaries “room_dict”, “instructor_dict”, and “time_dict”, respectively.

To create the “room_dict”, we can use the following key-value pairs:
– CS101: 3004
– CS102: 4501
– CS103: 6755
– NT110: 1244
– CM241: 1411

For the “instructor_dict”, the key-value pairs are:
– CS101: Haynes
– CS102: Alvarado
– CS103: Rich
– NT110: Burke
– CM241: Lee

Lastly, for the “time_dict”, the key-value pairs are:
– CS101: 8:00 a.m.
– CS102: 9:00 a.m.
– CS103: 10:00 a.m.
– NT110: 11:00 a.m.
– CM241: 1:00 p.m.

With these dictionaries in place, we can now proceed to implement the algorithm for the user input. First, we will prompt the user to enter a course number. Once the user enters a valid course number, we will retrieve the corresponding room number, instructor, and meeting time from the dictionaries.

Let’s outline the algorithm:

1. Create the “room_dict” and populate it with the given key-value pairs.
2. Create the “instructor_dict” and populate it with the provided key-value pairs.
3. Create the “time_dict” and populate it with the given key-value pairs.
4. Prompt the user to enter a course number.
5. Read and store the user’s input.
6. Check if the entered course number exists in any of the dictionaries (room_dict, instructor_dict, or time_dict).
7. If the course number is found, retrieve and display the associated room number, instructor, and meeting time.
8. If the course number is not found, display an error message indicating that the course number is invalid.
9. Repeat steps 4 to 8 until the user decides to stop the program by using a sentinel value.

This algorithm will allow the user to run the program as many times as desired. It ensures that the program only displays relevant information based on the user’s input. By using dictionaries, we can easily retrieve the necessary data associated with the input course number.

Next, we will proceed to implement and test the program based on this algorithm.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer