Q. What does the Python code: x = ‘Python’; print(x.upper()) output?

A
python
B
PYTHON
C
PyThOn
D
Error
Solution:

The upper() method converts all characters in the string to uppercase, so ‘Python’ becomes ‘PYTHON’.

Entri PDF Icon

Get Question Bank

Strengthen Your Practice with our comprehensive question bank.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!