Question: Input / Output: Enter Name: Adam Hi Adam, your appointment is confirmed at 2 PM Enter Name: Bob Enter time: 4 Invalid slot, please choose

Input/Output:
Enter Name: Adam
Hi Adam, your appointment is confirmed at 2 PM
Enter Name: Bob
Enter time: 4
Invalid slot, please choose either 1,2 or 3 pm slot
Hi Bob, your appointment is confirmed at 1 PM
Slot Not Available, please choose another slot
Slot Not Available, please choose another slot
Hi John, your appointment is confirmed at 3 PM
1 Bob
2 AdamYour task is to create a doctors' appointment system. Patients are only allowed to book an appointment with the doctor at 1,
2 or 3 PM. Use an appropriate collection to store patients' preferred time slot and their name. Write a loop that iterates as
long as there is an empty space in the doctors' schedule.
Allow the patients to enter their preferred time and name. In case the time slot is available, put the time and patients' name
into your chosen collection and print "Hi 3pm-
 Input/Output: Enter Name: Adam Hi Adam, your appointment is confirmed at

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!