Find the output of the following code.
Execute
x=0
z=1
for i in range (1,3) :
for j in range (1,i) :
z= i+j-1
if (3%2 ==0) :
x=x+z
elif (z%2==0) :
x = x+z-2
print ('x'='z', x)
Share
Find the output of the following code.
Execute
x=0
z=1
for i in range (1,3) :
for j in range (1,i) :
z= i+j-1
if (3%2 ==0) :
x=x+z
elif (z%2==0) :
x = x+z-2
print ('x'='z', x)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
hi
Explanation:
File "script.py", line 8
for j in range (1,i) :
^
IndentationError: expected an indented block