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

What will the following program print when run?

for j in range(2):
for i in range(6, 4, -1):
print (i)

Respuesta :

epicmathmoment epicmathmoment
  • 19-01-2021

Answer:

6, 5, 6, 5

Explanation:

The first for means it will run twice. The second one will start at 6 and -1 until it gets to 4 where it will stop before doing anything. We say the first number IS inclusive and the second number ISN'T. The second one produces 6, 5 once but happens twice because of the first for.

Answer Link

Otras preguntas

Describe, in at least two paragraphs, the economic policy of mercantilism and the role overseas colonies played within the system.
A 2,000-kg car traveling at 40 m/s hits a wall with a force of 40,000 N and comes to a stop. What was the impact time?
Which is the best estimate for written in scientific notation?
what does it mean for an organism to be anaerobic
What main theme is present in many of Franz Kafka works
50 POINTS AND BRAINLIEST!!! M<3= degrees
Read the excerpt from Sameer’s letter to his state legislature about funding for music education at his school. Musical training has many benefits, such as hel
simplify 3m^-2 / 5n^-3A.3n^3/5m^2B. 1/m^5n^4C.-4/5n^8D.3m^2n^10/2
If you repeat the perpendicular line segment construction twice using paper folding, you can construct:A.the midpoint of a line segment. B.an angle congruent to
Drag a statement or reason to each box to complete this proof.