I'm solving computational thinking and Python exercises in Python books There is a problem that says, "If the user is given a quiz and contains capital letters, let's guide them to enter only lowercase letters."
a = 1
while a !='q':
a = input ("Question. Discord in English? :")
if a == ''discord"
print ("Correct")
else :
print ("Wrong Answer")
After writing like this, I think I need to use a.islower() but I don't know what to do
python
str = 'Hell?O'
str2 = 'hell?o'
print(str.islower()) # False
print(str2.islower()) # True
if (str2.islower()):
print('It is lowercase') # 'It is lowercase'
© 2024 OneMinuteCode. All rights reserved.