Write a program and flowchart. The program should ask the user for the average temperature in each of the last 12 months. After the user has entered the temperatures, the program should display them. Use a "for" loop to ask for the data, and use another "for" loop to display the data. Store the data in an array called "temperature."Here is what the output looks like.

Respuesta :

#First we define the variables to house the temperatures

#temp is an empty array that will be used to store the temperature

Temp = []

#The months is defined as stated below

months = 12

#Ask the user for the temperature input and unit if possible

print("Kindly enter the temperature here")

#the program enter loop to get the temperatures.

for x in range(months):  

   InitTemp = str(input("Kindly add the unit behind the number .eg C for celcius"))

   Temp.append(InitTemp)

j=0

for x in range(len(Temp)):  

   j=j+1

   print("The Temperature is", " ", Temp[x], "for the ", j, "Month" )

#there is an attached photo for the flowchart

Ver imagen michealademola08