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

Who do you write 23 3/8 as a decimal
What was Common Sense? A. a book written by Thomas Jefferson swearing his allegiance to King George III B. a newspaper written by Benjamin Franklin for the Penn
The SALT treaty called for U.S. and Soviet nuclear disarmament. true or false?
The amount of heat energy required to raise the temperature of a unit mass of a material one degree is A. absolute zero. B. a Joule. C. its heat capacity. D. a
Who heads up the Department of Justice under the Executive Branch? A. Secretary of State B. Secretary of Justice C. Attorney General D. Secretary of Commerce
What contributions did slaves make to the economy of the middle colonies
Rust forms when _____ reacts with chemicals in rocks.
what is the ratio 25 to 35
For every ton of paper that is recycled, 17 trees are saved. Discrete or continuous?
how to make 0.08 into a fraction