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

Which term refers to a soulution with more of the same kind of molecules outside the cell than inside the cell
If DE is congruent to KR and O is the midpoint of ER and DK, which of the following congruence postulates can be used to prove that the triangles are congruent.
which region is not part of Siberia? A Region 1 B Region 2 C Region 3 D Region
examples of letters to future self worth 20 points and brainliest
what factor worked against unifcation in both german and italy?
A tile is chosen at random from a bag containing the following tiles: 7 blue, 3 green, 6 yellow, and 4 purple. Let P be the probability distribution defined on
who likes my profile picture will mark branlist
what is hotter 6000k or 3000k
PLEASEEEEEE HURRYYYYYYY
Could anyone help me with questions 14, 15, and 16?