spicee68003 spicee68003
  • 13-12-2020
  • Computers and Technology
contestada

PLEASE HELP!
Question # 1 Fill in the Blank What is the output?
for num in range(3):
print (num + 5)

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 18-12-2020

Answer:

The output is :

5

6

7

Explanation:

Given

The above lines of code

Required

What is the program output

The above code is python

This line implies that n has range of values from 0 to 2

for num in range(3):

This adds 5 to num and prints the result

print (num + 5)

So, when num = 0; 5 is printed because 0 + 5 = 5

So, when num = 1; 6 is printed because 1 + 5 = 6

So, when num = 2; 7 is printed because 2 + 5 = 7

Hence, the output is

5

6

7

With each number printed on a separate line

Answer Link

Otras preguntas

what is an interview
How are latitude and longitude lines drawn on a globe of the earth?
A. 10B. 12C. 14D. 16
simplify 2 x (3-1) + 3
List the negative thoughts that might have been going through Mr.Rage's head during this incident ?
Ductility describes the ability of a substance to deform without breaking or fracturing. This physical property allows metallic materials to be drawn into wires
Help *****Graph Function*****
How far should Galileo walk up the inclined plane?
Which of the following is a Microwork service provided by Amazon? A) Static Spark B) Electrical Geek C) Mechanical Turk D) Dynamic Week correct answer: C , Me
Landon babysits and works part time at the water park over the summer. One week, he babysat for 3 hours and worked at the water park for 10 hours and made $109.