subject

Write a loop to print all elements in hourly_temperature. Separate elements with a -> surrounded by spaces. Sample output for the given program: (must be in python) 90 -> 92 -> 94 -> 95
Note: There is a space after 95.

hourly_temperature = [90, 92, 94, 95]
for temp in hourly_temperature:
for index, temp in enumerate(str(temp)):
if index != len(temp)-1:
print(temp,'->',end=' ')
else:
print(temp, end='')
print('') # print newline

My expected out is:
90 -> 92 -> 94 -> 95
I keep getting:
90 -> 92 -> 94 -> 95 ->
NOTE: I can't edit the last line "print('') #print newline"

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 14:30
The egyptians invented the ? to water their crops, and may have used the ? to build the pyramids.
Answers: 1
question
Computers and Technology, 21.06.2019 23:30
Acomputer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a series of stored . the processing unit of most modern computers is a(n) . the instructions that tell a computer how to carry out a task are referred to as computer , which are distributed as software. computers run three main types of software: software, system software, and development tools. an example of system software is a computer system, which is essentially the master controller for all the activities that a digital device performs. digital devices are constructed using tiny electronic components that represent data bits as electrical signals. the system unit houses the system board, which contains several circuits made from semiconducting materials. computers come in three popular form factors: component, , and slate. many of today's digital devices operate on battery power supplied by ion batteries. battery life and lifespan can be extended by following good battery management practices.
Answers: 3
question
Computers and Technology, 22.06.2019 03:20
Which of these is a benefit of social networking? oa. hiding your true identity from friendsob. avoiding talking to people in personoc. spending time with friends instead of studyingod. connecting with new people
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is [email protected] -
Answers: 1
You know the right answer?
Write a loop to print all elements in hourly_temperature. Separate elements with a -> surrounded...
Questions
question
History, 29.10.2020 19:10
question
Social Studies, 29.10.2020 19:10
question
Mathematics, 29.10.2020 19:10
question
Chemistry, 29.10.2020 19:10
question
Mathematics, 29.10.2020 19:10
question
Mathematics, 29.10.2020 19:10
question
Mathematics, 29.10.2020 19:10
Questions on the website: 13722359