Python Lists and Functions

practice in programming with one of Python’s most widely used
“container” data types — the List (commonly called an “Array” in most other programming languages). More
specifically you will demonstrate how to:
Declare list objects
Access a list for storing (i.e., writing) into a cell (a.k.a., element or component) and retrieving (i.e., reading) a
value from a list cell/element/component
Iterate through a list looking for specific values using a for…in loop repetition construct
Pass an entire list argument to a function
Process a list parameter received by a function
Discussion:

simulating a Weather Station responsible for recording hourly temperatures and
reporting on certain characteristics (e.g., average temperature) from your recordings. You will also be
expanding on your experience in creating functions and passing them more complex parameters (i.e.,
complete list arguments – sometimes empty and sometimes full).
Specifications:
DDI&T a Python program to input, store, and process hourly temperatures for each hour of the day (i.e., 24
temperatures). Your program should be divided logically into the following parts:
In function main() declare an empty List container:
HourlyTemperatures = []
Pass the empty HourlyTemperatures list to a function,
GetTemperatures(HourlyTemperatures)

This question has been answered.

Get Answer