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

Ok last one I swear. HELP!
One fifth of one number and one fourth of a number are added, the result is 29. What is the original number?
Provide one example of how information technology has created an ethical dilemma that would not have existed before the advent of I.T
types of cells and its function
If a car travels 30 kilometers in 2 hours, it’s average speed is?
What two exercises could be used to increase your ability to pe form push-ups in a fitness evaluation?
Dan £9.90 per hour. How much will he earn for six hours work?
Can anyone help me with this question??
need help with polynomial long division. BRAINLIEST FOR BEST ANSWER!
Which part of a moss plant produces spores? A. thin brown stalks B. the sperm