Page 1 of 1

should create a global variable "list" to store all such appointments. For the sake of easy explanation, we refer to thi

Posted: Fri May 20, 2022 10:08 am
by answerhappygod
Should Create A Global Variable List To Store All Such Appointments For The Sake Of Easy Explanation We Refer To Thi 1
Should Create A Global Variable List To Store All Such Appointments For The Sake Of Easy Explanation We Refer To Thi 1 (199.22 KiB) Viewed 25 times
phython code please
should create a global variable "list" to store all such appointments. For the sake of easy explanation, we refer to this variable by appointmentList in the rest of this document. There are some limitations that must be imposed on the appointment records: 1. The start and end time in an appointment record indicates the hour; 2. An appointment starts and finishes on the same day; 3. Only appointments occurring at a future time can be added to the Diary; 4. No concurrent appointments are to be added to the Diary. . . Date A date is valid if and only if 10000>year> 2021 1<= month <= 12 1 <=day <= daysInMonth(month, year) • daysInMonth = 30 if the month is April, June, September, or November • daysInMonth = 31 if the month is January, March, May, July, August, October, or December • daysInMonth = 28 if the month is February and is not a leap Year(year) daysInMonth= 29 if the month is February and is a leap Year(year) A year is a leap year if The year is divisible by 400 The year is divisible by 4 and if the year is not divisible by 100 So, the year 2000 was a leap year, 2004 was a leap year but 2100 will not be a leap year . Time The time (Start time and End time) of an appointment is valid if and only if: 7<= Start/End Time <= 22 Start End; ignore minutes and seconds, only integral point input Taking both date and time into account, an appointment needs to start later than the time when the appointment is being added to the Diary. Your Tasks It is strongly suggested that the following approach is to be taken to design and implement the program Input Functions You should first design, implement and test the input functions of Diary. You need to create 5 input functions (refer to Figure 1). For example, the input function is applied to enter the date with the hint “Please enter the date of your new appointment, e.g. 25/9/2022”. You are welcome to design your 5 input functions and IDE, as long as they can input the priority, date, start time, end time and subject of the new appointments similar to the sample IDE shown in Fig. 1. The 5 inputs for each appointment record will be stored as a string (record) in the appointmentList All the functions except built-in functions should be presented with proper Docstrings