Find the output of:
i=0,sum=0
While i<9:
If i %4==0:
sum=sum+i
i=i+2
print(sum)
Answers
Answered by
2
Answer:
12
Explanation:
step 1: i=0 0<9 then 0%4==0 sum=0 now i=2
step 2:i=2 2<9 then 2%4==0 condition not satisfied so sum=0 i=4
step 3:i=4 now condition satisfied so sum=sum+4=4 i=6
step 4:i=6 6%4=2 so condition not satisfied sum=4
step 5: i=8 8%4==0 so condition satisfied sum=4+8=2 i=10
then 10<9 condition not satisfied.
so sum=12
Answered by
1
Answer:
g that yd Rick ideas decision will
Similar questions