204k views
5 votes
Write a program called temperatures01 that reads a sequence of maximum daily temperatures.

A. I understand and will implement the provided instructions.
B. I need more information or clarification to proceed.
C. I am unable to complete this task.
D. I am not interested in programming tasks.

1 Answer

4 votes

Final answer:

To write a program called temperatures01 that reads a sequence of maximum daily temperatures, you can use a programming language like Python.

Step-by-step explanation:

To write a program called temperatures01 that reads a sequence of maximum daily temperatures, you can use a programming language like Python. Here is a possible solution:

Here is an example implementation in Python:

temperatures = []

while True:
temperature = input('Enter the maximum daily temperature (-999 to stop): ')
if temperature == '-999':
break
temperatures.append(int(temperature))

print('List of temperatures:', temperatures)

Here is a possible solution: Create an empty list to store the temperatures. Use a loop to ask the user for the maximum daily temperature and add it to the list until they decide to stop entering temperatures. Print the list of temperatures.

User Mindvirus
by
7.4k points