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

Tell whether the angles are complementary or supplementary. Then find the value of x. 8 and 9 only.
Which dot plot has the largest range
what is the 15th term in the sequence...pt.1​
1Select the correct answer.Which document is referred to as the “supreme law of the land”?A. US ConstitutionB. Bill of RightsC. Declaration of IndependenceD. Fi
Why did the goths move into the Roman Empire
please help words arent unscrambled and work is overdo!!!scrambled words sacó (unscrambled)robcra sicasatpalovedervreraciabre (unscrambled)buzón (unscrambled) c
In parallelogram RSWY, find m
find the x-intercept of the line 2× +4y =8​
what’s the answer to this and working out
Taking information from a gene to produce a protein is better known as: A) transcription B) translation C) gene expression D) DNA replication