Python Quiz2
Python Quiz2
ANS:
i=1
while True:
if i%0O7 == 0:
break
print(i)
i += 1
Ans:
i=1
while True:
if i%2 == 0:
break
print(i)
i += 2
ANS:
i=5
while True:
if i%0O9 == 0:
break
print(i)
i += 1
ANS:
i=0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
ANS:
ANS:
a=2
for i in range(4):
a=a*i
print(a)
ANS:
Q.8: a=12
C=int(a)+str(a) result?
ANS:
ANS:
Q.10: Which of the following is an invalid statement?
a) abc = 1,000,000
d) a_b_c = 1,000,000
ANS:
Q.9:
i=1
while True:
print(i+2)
Result?
Q.10:
s=2
print(i+s)
Result: