Python Output Based Quiz 2

Share with others

Welcome to your Python Output Based Quiz 2

Q11. Write the output of the following code :

for i in range(1,8):
      print(i)
      i+=2

Q12. Write the output of the following code :

for i in range(4,7):
      i=i+3
     print("Hello")

Q13. Write the output of the following code :

for i in range(4,7):
      i=i+3
      print("Hello",i)

Q14. Write the output of the following code :

i=4
while(i<10):
    i=i+3
    print(i)

Q15. Write the output of the following code :

for i in range(20):
    if i//4==0:
    print(i)

Q16. Write the output of the following code :

x=1234
while x%10:
    x=x//10
    print(x)

Q17. Write the output of the following code :

for i in 1,2,3:
    print(i*i)

Q18. Write the output of the following code :

for i in 2,4,6:
    print("H"*i)

Q19. Write the output of the following code :

p=10
q=20
p=p*q//4
q=p+q**3
print(p,q)

Q20. Write the output of the following code :

x=2
y=6
x=x+y/2 + y//4
print(x)


Share with others

Leave a Reply

error: Content is protected !!