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 distance around the outside of a park is 0.4 mile. Sophia ran 0.55 of the distance during her recess. How far did she run?
A solution has a pH of 9.40 at 50°C At this temperature, Kw = 5.48 x 10^-14. What is the pOH of the solution?
PLSSSS HELP IF YOU TRULY KNOW THISSSS
Explain the difference between autosomal genes and sex-linked genes.
Complete the sentence with the accurate term.The rabbit is aand only eats plants.
A rectangular garden plot is 17ft long and 11 ft wide. The owner of the garden wants to plant pepper plants in the plot. Each plant needs a space that is approx
Why does Hally call prison procedure barbaric? (Master harold)
The volume of a cylinder is 675x cm³. The radius of the base of the cylinder is 5 cm. What is the height of the cylinder?
5. Explain the chemical tests forCardialglycoside.
help please i need help ​