261099 261099
  • 03-11-2020
  • Computers and Technology
contestada

What is the output of the following program?

for num in range(4):
print (num * 2)

Respuesta :

Cytokine
Cytokine Cytokine
  • 03-11-2020

The range() function with one parameter defaults to a starting value of 0 and has an ending value of the number specified exclusive.

range(4) is all the integers between 0 and 4 not including 4.

for num in range(4):

   print(num*2)

The output would be 0 2 4 6 all on separate lines.

Answer Link

Otras preguntas

I just need to know the answer pls
Answers for question 65 and 66
який характер у месі​
Hepbygcfxuhburzctubnitcibrxbu
convert the following measurment​
What is the awnser to 20.24÷2×6.2
3/4(x+6) = -1/4x Explain how to solve the equation.
In a class of 49,the ratio of the number of students who passed to the number of students who failed is 2:5,find the number of students who passed
Correct answers please?? I can't figure it out
HELPPPPPPPPPP PLEASEEEEEEEE!!!!!!