MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Python
Advanced Python
Quiz 1
1
2
3
4
5
6
7
8
9
10
Q.1
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x[:-1]: print(i, end = " ")
a) a a a a a
b) a a a a a a
c) a a a a a a …
d) a
Q.2
What will be the output of the following Python code? i = 0 while i < print(i) i += 1 if i == break else: print(0)
a) 0 1 2 0
b) 0 1 2
c) error
d) none of the mentioned
Q.3
What will be the output of the following Python code? i = 0 while i < print(i) i += 1 else: print(0)
a) 0 1 2 3 0
b) 0 1 2 0
c) 0 1 2
d) error
Q.4
What will be the output of the following Python code? x = "abcdef" while i in x: print(i, end=" ")
a) a b c d e f
b) abcdef
c) i i i i i i …
d) error
Q.5
What will be the output of the following Python code? x = "abcdef" i = "i" while i in x: print(i, end=" ")
a) no output
b) i i i i i i …
c) a b c d e f
d) abcdef
Q.6
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x: print(i, end = " ")
a) no output
b) i i i i i i …
c) a a a a a a …
d) a b c d e f
Q.7
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x: print('i', end = " ")
a) no output
b) i i i i i i …
c) a a a a a a …
d) a b c d e f
Q.8
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x: x = x[:- print(i, end = " ")
a) i i i i i i
b) a a a a a a
c) a a a a a
d) none of the mentioned
Q.9
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x: x = x[1:] print(i, end = " ")
a) a a a a a a
b) a
c) no output
d) error
Q.10
What will be the output of the following Python code? x = "abcdef" i = "a" while i in x[1:]: print(i, end = " ")
a) a a a a a a
b) a
c) no output
d) error
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page