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

When a brand name cannot be spoken, it is considered a __________.?
A rectangular prism is 3 meters long, 4 meters wide, and has a total surface area of 94 square meters. What is its height? 3 m 4 m 5 m 6 m
How did the conversion of king Clovis encourage the spread of Christianity in medieval Europe
What is the prefix of impact?
What was the city of timbuktu best known for? its role as a government center its wealth and education its gold and salt trades its location on the niger river?
4 old friends meet. if each one shakes hands with each other's, how many handshakes are there altogeather?
I need help hopefully the picture has been uploaded is it A b C or D
Who remembers the name of Lyndon Johnson's dogs?
What percentage of college men will be the victim of sexual assault?
what is the role of religion in the renaissance