Lab Exam I (October 1, 2024)
Lab Exam Policy
This is a closed-book exam! You may only have your cheat sheet and your IDE open. You may not use an internet browser to research the solution. There is only one programming question. Please read the question carefully. You will have 1 hour and 40 minutes to complete this exam. Note: Please leave time to submit your code using the following command on the tinman server:sudo handin1301 e1 calendar.pyTo transfer the file to tinman, you may use FileZilla OR the following procedure: Open a Terminal/Powershell Window. cd into the folder containing calendar.py. Then, type the following command (replace userid with your campusid):
sftp userid@tinman.cs.gsu.eduyou will be asked for your password; type it in (you may have to say "yes" to a question before password). once you see the sftp prompt, transfer the file as follows:
put calendar.pyThen make sure you exit the sftp program:
exit
calendar.py
Write a program that takes a date as input and outputs the date's season in the southern hemisphere. Your program must take as input from the user a string that represents the month and an integer to represent the day. For example, month = 'April' and day = 15.The dates for each season in the southern hemisphere are:
- Autumn: March 20 - June 20
- Winter: June 21 - September 21
- Spring: September 22 - December 20
- Summer: December 21 - March 19
$ python calendar.py Please enter the month: December Please enter the day: 25 December 25 is summer in the southern hemisphere