MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Python
Basic 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? print("abc DEF".capitalize())
a) abc def
b) ABC DEF
c) Abc def
d) Abc Def
Q.2
What will be the output of the following Python code? print("abc. DEF".capitalize())
a) abc. def
b) ABC. DEF
c) Abc. def
d) Abc. Def
Q.3
What will be the output of the following Python code? print("abcdef".center())
a) cd
b) abcdef
c) error
d) none of the mentioned
Q.4
What will be the output of the following Python code? print("abcdef".center(0))
a) cd
b) abcdef
c) error
d) none of the mentioned
Q.5
What will be the output of the following Python code? print('*', "abcdef".center(7), '*')
a) * abcdef *
b) * abcdef *
c) *abcdef *
d) * abcdef*
Q.6
What will be the output of the following Python code? print('*', "abcdef".center(7), '*', sep='')
a) * abcdef *
b) * abcdef *
c) *abcdef *
d) * abcdef*
Q.7
What will be the output of the following Python code? print('*', "abcde".center(6), '*', sep='')
a) * abcde *
b) * abcde *
c) *abcde *
d) * abcde*
Q.8
What will be the output of the following Python code? print("abcdef".center(1))
a) 1abcdef
b) abcdef1
c) abcdef
d) error
Q.9
What will be the output of the following Python code? print("abcdef".center('1'))
a) 1abcdef
b) abcdef1
c) abcdef
d) error
Q.10
What will be the output of the following Python code? print("abcdef".center('12'))
a) 12abcdef12
b) abcdef1212
c) 1212abcdef
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