There is nothing quite like Minnesota summers: we get nearly 16 hours of daylight around the summer solstice. On the other hand, winters can be dark. We only get just over 8 hours of sunlight in the depth of winter. To demonstrate the variation in Minnesota sunlight, write a program that prompts the user for starting sunrise and sunset times, a number of days, and a time format preference. Calculate and display a table of sunrise and sunset times for the requested number of days, in the preferred format. To simplify the calculation, you may assume: Sunrise is three minutes later each day, and sunset is two minutes earlier each day. This is roughly consistent with the present time of year. For simplicity, assume that days only get shorter for the purpose of this problem. The user will enter the starting sunrise and sunset times in proper 24-hour, military time in the range 0000 – 2359 The user will enter a number of days in the range 0 – 365 For full credit: Apply the concepts from Lab 2 (up through Chapter 5 of your textbook). Specifically, use arithmetic operations and loops. Avoid the use of advanced data structures (lists, tuples, sets, dictionaries), string slicing, and other advanced concepts, even if you know them. Don’t worry; you’ll get an opportunity to demonstrate your prowess with these concepts on later quizzes and the final exam! You are encouraged, but not required, to write as many functions as you need to accomplish the task efficiently. Upload a .py file before time expires. Examples Today’s sunrise and sunset times are 0737 and 1817, respectively: Initial sunrise: 0737 Initial sunset: 1817 Display days: 15 Display format (1 = 24-hour, 2 = AM/PM): 1 Day Sunrise Sunset — ——- —— 0 07:37 18:17 1 07:40 18:15 2 07:43 18:13 3 07:46 18:11 4 07:49 18:09 5 07:52 18:07 6 07:55 18:05 7 07:58 18:03 8 08:01 18:01 9 08:04 17:59 10 08:07 17:57 11 08:10 17:55 12 08:13 17:53 13 08:16 17:51 14 08:19 17:49 15 08:22 17:47 Same as above, using 12-hour AM/PM format: Initial sunrise: 0737 Initial sunset: 1817 Display days: 15 Display format (1 = 24-hour, 2 = AM/PM): 2 Day Sunrise Sunset — ——- —— 0 7:37 AM 6:17 PM 1 7:40 AM 6:15 PM 2 7:43 AM 6:13 PM 3 7:46 AM 6:11 PM 4 7:49 AM 6:09 PM 5 7:52 AM 6:07 PM 6 7:55 AM 6:05 PM 7 7:58 AM 6:03 PM 8 8:01 AM 6:01 PM 9 8:04 AM 5:59 PM 10 8:07 AM 5:57 PM 11 8:10 AM 5:55 PM 12 8:13 AM 5:53 PM 13 8:16 AM 5:51 PM 14 8:19 AM 5:49 PM 15 8:22 AM 5:47 PM Maybe unrealistic, but ensure your table displays properly across boundaries: Initial sunrise: 0942 Initial sunset: 2214 Display days: 10 Display format (1 = 24-hour, 2 = AM/PM): 2 Day Sunrise Sunset — ——- —— 0 9:42 AM 10:14 PM 1 9:45 AM 10:12 PM 2 9:48 AM 10:10 PM 3 9:51 AM 10:08 PM 4 9:54 AM 10:06 PM 5 9:57 AM 10:04 PM 6 10:00 AM 10:02 PM 7 10:03 AM 10:00 PM 8 10:06 AM 9:58 PM 9 10:09 AM 9:56 PM 10 10:12 AM 9:54 PM If the user doesn’t want any projections, display at least the starting sunrise and sunset times in the preferred format: Initial sunrise: 0737 Initial sunset: 1817 Display days: 0 Display format (1 = 24-hour, 2 = AM/PM): 1 Day Sunrise Sunset — ——- —— 0 07:37 18:17 Initial sunrise: 0737 Initial sunset: 1817 Display days: 0 Display format (1 = 24-hour, 2 = AM/PM): 2 Day Sunrise Sunset — ——- —— 0 7:37 AM 6:17 PM
Blog
A 56-year-old patient is being seen for osteoarthritis of th…
A 56-year-old patient is being seen for osteoarthritis of the knee in the clinic. Which should the nurse recommend when discussing strengthening exercises?
A child with osteomyelitis asks the nurse, “What is a ‘sed’…
A child with osteomyelitis asks the nurse, “What is a ‘sed’ rate?” What is the best response for the nurse?
Which patient statement indicates the need for additional te…
Which patient statement indicates the need for additional teaching for a patient with rheumatoid arthritis who is taking meloxicam?
Hygrometers will give different readings if a sugar solution…
Hygrometers will give different readings if a sugar solution with density 1.05 g/ml and ethanol mix with density of 1.05 g/ml are used.
The best line through a set of points ____________.
The best line through a set of points ____________.
A patient has undergone a bipolar hip repair (hemiarthroplas…
A patient has undergone a bipolar hip repair (hemiarthroplasty). Which is the appropriate instruction?
The nurse is caring for a patient who has rheumatoid arthrit…
The nurse is caring for a patient who has rheumatoid arthritis and who is receiving infliximab IV every 8 weeks. Which laboratory test will the nurse anticipate that this patient will need?
Consider the check_temp function, which returns a label give…
Consider the check_temp function, which returns a label given a temperature reading (in C): def check_temp(temp_c): if temp_c < 0: return "Freezing" elif temp_c < 20: return "Cool" elif temp_c < 30: return "Warm" else: return "Hot" The function works as intended, however it...
Which will the home health nurse include monitoring for in t…
Which will the home health nurse include monitoring for in the plan of care for an 82-year-old female with severe kyphosis from ankylosis?