Podcast
Questions and Answers
what will be the output of the following code:
i=0
while i<=6:
i=i+1
if(i==3):
continue
print(i)
what will be the output of the following code: i=0 while i<=6: i=i+1 if(i==3): continue print(i)
what will be the output of the following code:
i=1
sum=0
while(i<=5):
sum=sum+i
i+i+1
print(sum)
what will be the output of the following code: i=1 sum=0 while(i<=5): sum=sum+i i+i+1 print(sum)
what will be the output of the following code:
c=0
for letter in 'Tamilnadu':
if letter !='I':
c=c+1
pass
print(c)
what will be the output of the following code: c=0 for letter in 'Tamilnadu': if letter !='I': c=c+1 pass print(c)
what will be the output of the following code:
for i in range(1,6,2):
print(i,end=" ")
what will be the output of the following code: for i in range(1,6,2): print(i,end=" ")
Signup and view all the answers
what will be the output of the following code:
a,b=12,5
if a+b:
print('true')
else:
print('false')
what will be the output of the following code: a,b=12,5 if a+b: print('true') else: print('false')
Signup and view all the answers
break statement in python is used __________
break statement in python is used __________
Signup and view all the answers
a loop block in python starts with a __________
a loop block in python starts with a __________
Signup and view all the answers
what will be the output of the following code?
for i in range(1,4):
print(i)
break
else:
print("no break")
what will be the output of the following code? for i in range(1,4): print(i) break else: print("no break")
Signup and view all the answers
how many time will the following loop execute?
i=2
while(i>0):
i=i-1
how many time will the following loop execute? i=2 while(i>0): i=i-1
Signup and view all the answers
which of the following is a valid for loop in python?
which of the following is a valid for loop in python?
Signup and view all the answers