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 choice is an example of an independent clause? a. who i asked to be in my new club. b. i wanted to start my own school club. c. because our school had onl
The angle measure in degrees that corresponds to 7/10ths of a circle is what? a. 63 b.126 c. 252 d. 257/ also, Its corresponding measurement in radians is 7 pie
What helps the body regulate processes.?
what is the density of an object that has a mass of 550 grams and displaces 25 ml of water? select all that apply. 22 ml/g .04 ml/g 22 g/ml 22 g/cm 3
Six to eight servings are required daily. a. fats b. carbohydrates c. water d. vitamins e.tea
Help me plzz I'll do the same
Which of the following is a phase of mitosis? a. cytokinesis b. interphase c. telophase d. none of the above
At a camp, the campers need more than 15 gallons of fresh water everyday. They already jave a gallon of fresh water, and they can collect the additional water b
what type of home mortgage has payments that can change?
The weight of an object is 200 N. The object sinks in tub of water. The buoyant force is a)less than 200 N b)greater than 200 N c)equal to 200 N