Question: Use Python Let's look at some weather data from January 2023 , which properly represented a Saskatchewan winter. In a5q2v1_starter. py you are given a

Use PythonUse Python Let's look at some weather data from January 2023 ,which properly represented a Saskatchewan winter. In a5q2v1_starter. py you are given

Let's look at some weather data from January 2023 , which properly represented a Saskatchewan winter. In a5q2v1_starter. py you are given a definition of a list of lists. Each sublist contains three pieces of information - the date, the day daily high temperature, daily low temperature. Create the following list comprehensions:: (a) Are there any days where the temperature was above 0? Use a single list comprehension to create a list of the dates where the daily high temperature was more than O and print () the results. (b) You probably would agree that Monday is the worst day to be cold. Use a single list comprehension to create a list of the daily low temperatures for Mondays and print() the results. (c) Some days start cold but get much warmer. Use a single list comprehension to create a list of the difference between the daily low and daily high temperature for each date and print () the results. (d) But what about the weekends!? Use a single list comprehension to create a list of lists where each sublist consists of a date and daily high temperature, but only include dates that are Saturday or Sunday and print() the results. Note that this question is to test your use of list comprehensions. No marks will be given for solutions that do not use list comprehensions. Please be sure to use print() to show your results in the console. What to Hand In Rename your completed a5q2v1_starter.py file to a5q2v1.py and submit it. The version number (v1) portion of the file names must be changed to v2, v3 etc. each time you resubmit your assignment. Remember to include all your solution files each time you submit/resubmit your assignment. Let's look at some weather data from January 2023 , which properly represented a Saskatchewan winter. In a5q2v1_starter. py you are given a definition of a list of lists. Each sublist contains three pieces of information - the date, the day daily high temperature, daily low temperature. Create the following list comprehensions:: (a) Are there any days where the temperature was above 0? Use a single list comprehension to create a list of the dates where the daily high temperature was more than O and print () the results. (b) You probably would agree that Monday is the worst day to be cold. Use a single list comprehension to create a list of the daily low temperatures for Mondays and print() the results. (c) Some days start cold but get much warmer. Use a single list comprehension to create a list of the difference between the daily low and daily high temperature for each date and print () the results. (d) But what about the weekends!? Use a single list comprehension to create a list of lists where each sublist consists of a date and daily high temperature, but only include dates that are Saturday or Sunday and print() the results. Note that this question is to test your use of list comprehensions. No marks will be given for solutions that do not use list comprehensions. Please be sure to use print() to show your results in the console. What to Hand In Rename your completed a5q2v1_starter.py file to a5q2v1.py and submit it. The version number (v1) portion of the file names must be changed to v2, v3 etc. each time you resubmit your assignment. Remember to include all your solution files each time you submit/resubmit your assignment

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!