A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

41. What is the output of the following?
print("abc DEF".capitalize())
a. abc def
b. ABC DEF
c. Abc def
d. Abc Def
View Answer Report Discuss Too Difficult!
Answer: (c).Abc def

42. What is the output of the following?
print("abc. DEF".capitalize())
a. abc. def
b. ABC. DEF
c. Abc. def
d. Abc. Def
View Answer Report Discuss Too Difficult!
Answer: (c).Abc. def

43. What is the output of the following?
print("abcdef".center())
a. cd
b. abcdef
c. error
d. none of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (c).error

44. What is the output of the following?
print("abcdef".center(0))
a. cd
b. abcdef
c. error
d. none of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (c).error

45. What is the output of the following?
print('*', "abcdef".center(7), '*')
a. * abcdef *
b. * abcdef *
c. *abcdef *
d. * abcdef*
View Answer Report Discuss Too Difficult!
Answer: (b).* abcdef *

46. What is the output of the following?
print('*', "abcdef".center(7), '*', sep='')
a. * abcdef *
b. * abcdef *
c. *abcdef *
d. * abcdef*
View Answer Report Discuss Too Difficult!
Answer: (d).* abcdef*

47. What is the output of the following?
print('*', "abcde".center(6), '*', sep='')
a. * abcde *
b. * abcde *
c. *abcde *
d. * abcde*
View Answer Report Discuss Too Difficult!
Answer: (c).*abcde *

48. What is the output of the following?
print("abcdef".center(7, 1))
a. 1abcdef
b. abcdef1
c. abcdef
d. error
View Answer Report Discuss Too Difficult!
Answer: (d).error

49. What is the output of the following?
print("abcdef".center(7, '1'))
a. 1abcdef
b. abcdef1
c. abcdef
d. error
View Answer Report Discuss Too Difficult!
Answer: (a).1abcdef

50. What is the output of the following?
print("abcdef".center(10, '12'))
a. 12abcdef12
b. abcdef1212
c. 1212abcdef
d. error
View Answer Report Discuss Too Difficult!
Answer: (d).error

Page 5 of 13