Computer Science, asked by mohammadalthaf39, 8 months ago

for z in range (-100, 100, 100)
Print (z end = ")​

Answers

Answered by MdZafferAli
0

Answer:

An Syntax error occurs.

Answered by vishakasaxenasl
0

Answer:

for z in range (-100, 100, 100)

  print (z end = ")​

This will print

-100 0

Explanation:

  • The range function assigns the value from -100 to 100 to the variable z.
  • When the for loop executes for the first time it has value of -100. So the first 100 will be printed.
  • After that, inital value of z(-100) is update by third value given in range function ie 100.
  • Since -100+100 = 0
  • Hence, 0 is printed.
  • In the futher iteration, 0 is increment again by 100 and it became 0+100=100. But this can't be printed.
  • Because it violates the termination range that is only 100-1 = 99,

So our final output remains:

-100 0

#SPJ3

Similar questions