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

The answer please I can’t Fail this class......
James completed 18 math problems. This is 30% of the problems he has to do. How many total math problems must he complete to be done?
Tyler is going on a hiking trip. At the end of the first day he has 5,250 feet left to climb. He plans to climb 500 feet each day. Write an explicit formula to
Can someone help me pls ill give brainliest
A solid object is dropped into a pond with a temperature of 20 degrees Celsius. The function f(t) = Ce(-kt) + 20 represents the situation where t is time in min
if you guess the number im thinking of illl give you 100 points
bob buys a t-shirt for $7.45 he pays with a 20 bill. how much change will he get?
PLEASE ANSWER: Select the correct answer. Solve -369-(-103) - (182) A. -44 4/9 B. -28 C. 87 4/9 D. 64 8/9
Each day, a local dog shelter spends an average of $2.40 on food per dog. The manager estimates the shelter's daily expenses, assuming there is at least one dog
Help me write an essay on the topic the person I admire​