Computer Science, asked by shivpreetrathore83, 5 months ago

Give the output of the following python statements.
y=5
for lin rangel1,3):
forj in range(0,1);
z=i+j-1 2-0
if
(z%2)==0:
y=y+z
elif
(z%3)==0:
y=y+z-2
print ("y=",y)​

Answers

Answered by Pradeepkrish
0

The given program is in wrong format

Answered by DarkShadow040
1
The whole code is in wrong format, but consider fixing them you code should be:

y=5
for i in range(1,3):
for j in range(0,1):
z=i+j-12-0
if (z%2)==0:
y=y+z
elif (z%3)==0:
y=y+z-2
print ("y=",y)

If the code is this, then output should be
y= -5
Similar questions