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

What is the rounding or compatible numbers to estimate the sum of 87+34
How did king james 1 important to the survival of the Jamestown settlers
tina bought some nail polish and lip gloss at the store. the nail polish cost $4.50 per bottle and lip gloss cost $7 per tube. tina bought 9 items and paid $50.
is 7 over 9 , 5 over 12, and 5 over 8 terminating or repeating decimals? and what are they in decimals? please explain..thx :)
how do solve 21s=3 ?
Two pounds of peaches at the farmers market cost $4.20.How much will 5 pounds cost?
What is 3,200,000,000,000 in scientific notation
a=(vf-vi)/t solve for vf
what does alignment mean in dance?
what is 1 20/32 as a decimal and percent?