Write the output:
Y=5
For I in range(1,3):
For j in range(0,I):
Z=I+j-1
If (z%2)==0:
Y=y+z
elif (z%3)==0:
Y=y+z-2
Print("Y=",Y)
Answers
Answer:
y= -5
Explanation:
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
Conditional sentences
Condition statements in Python take action based on whether a given condition is true or false. Depending on the outcome of a condition, you can execute different blocks of code. Condition statements always return True or False. Conditional statements are classified into three types.
if-else statement
nested if-else if-else
Iterative statements in Python allow us to run a block of code repeatedly as long as the condition is True. It is also known as a loop statement.
For similar questions refer-https://brainly.in/question/7284507
#SPJ1