Computer Science, asked by DeepashikhaPamnani, 5 months ago

Can someone explain me this code of python:-
var = 10
for i in range(10):
for j in range(2, 10, 1):
if var % 2 == 0:
continue
var += 1
var+=1
else:
var+=1
print(var)​

Answers

Answered by guyiscrazy901
10

Answer:

ok

Explanation:

var is basically a varible which contains the number 10

then there is a for statement which says for I in range and another says for j in range, thay don't matter at all as they print nothing they are just statementa to stall he answer,

now the if statement

If var(which is 10) is divided by 2 and asnwer will be zero:

the staement is true as 10÷2 is 5 and remainder is 0

so the next process will get executed,

it says var +=1 2 times which means 10 + 1

10 + 1

which is 12

and finally it says to print(var)

and the product is 12

if I helped mark as brainliest

Similar questions