Question Detail

COS 102 Advanced Text Processing Objective Question

Question

Which of the following string methods converts all characters in a string to uppercase?
Options
A .lower()
B .capitalize()
C .upper()
Correct Answer
D .title()
Correct Answer

Option C is the correct answer.

Detailed Explanation

The 'Essential String Methods' table explicitly lists .upper() as the method that 'Converts character casing completely' to uppercase, with the example 'Hi'.upper() → 'HI'.

Hint

Look for the method related to 'upper' case.

Question Info