write a loop to print all elements in hourly_temperature. separate elements with a -> surrounded by spaces. sample output for the given program with input: '90 92 94 95'

Respuesta :

fichoh

The required program written in python 3 which displays temperature values in listed using the format given is :

hourly_temperature = [90,92,94,95]

#list of hourly temperature values is attached to the variable hourly_temperature

elements = " "

# initializes an empty string variable called elements

for temp in hourly_temperature:

#use a for loop to iterate over the temperature values in hourly_temperature

if elements != " ":

#Check if elements is not

elements += "->"

#if it is not empty, then add an arrow

elements += str(temp) + " "

# add each temperature value to the element variable.

print(elements)

#Display the output of the element variable.

Learn more :https://brainly.com/question/24965801

ACCESS MORE