charris47 charris47
  • 19-01-2021
  • Computers and Technology
contestada

What would the following program print to the screen when run?

my_list = [7, 0, 0, "d", "n", "o", "B"]

my_list.reverse()

for thing in my_list:
print (thing)

Respuesta :

absor201
absor201 absor201
  • 19-01-2021

Answer:

The output will be:

B

o

n

d

0

0

7

Explanation:

Given code is of Python language

Let us look at the code line by line

The first line is:

my_list = [7, 0, 0, "d", "n", "o", "B"]

This line will create a list with the given elements.

my_list.reverse()

This line will reverse the sequence of the elements of the list

for thing in my_list:

print (thing)

These lines will simply print the reversed elements of the list on screen.

The output will be:

B

o

n

d

0

0

7

Answer Link

Otras preguntas

The mean of a normal probability distribution is 320; the standard deviation is 18.
Given the Boolean expression, output=C'+AB', use a maximum of 3 logic gates to build this logic circuits. Students can ONLY use inverters, 2 input OR, NOR, AND,
What is the inverse of the given relation? y=2x−1
helpppp, i will mark brainliest!
In paragraphs 3 and 5, why does the author use bullet points? How does this structure contribute to her purpose?
describe how the applied force was determined in the experiment​
PLEASE HELP WILL MARK BRAINLIEST!!!!
What is the solution of the equation? 2x+5√3+7=15
Suppose you have a bag with 50 letter tiles in it and 11 of the tiles are the letter M. If you pick a letter tile at random from the bag, the probability that i
Don’t require Spitzer “connectors” to reveal their affiliation with the corporate word-of-mouth marketing campaign. They don’t have to recommend a product they