Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question # 4 multiple choice which string method returns true if the ch…

Question

question # 4
multiple choice
which string method returns true if the character is an uppercase letter?
letter = input(\enter a letter: \)
isupper(letter)
letter.isupper()
isupper(letter)
letter.isupper()

Explanation:

Brief Explanations

In Python, the correct string - method to check if a character is an uppercase letter is isupper(). It is called as a method on a string object (in this case, the letter variable which holds a single - character string). The correct syntax is letter.isUpper() is incorrect Python syntax, isUpper(letter) is also incorrect as it's not the right way to call the method, and isupper(letter) is incorrect because it should be called as a method on the string object. The correct method call is letter.isupper().

Answer:

letter.isupper()