Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Practice

Instruction

Good start! Do you remember strings?

Exercise

As you can see, we've prepared the text variable in the Code Editor. This variable contains quite a long string of characters. Your task is to iterate over the characters of the string, count the number of uppercase letters and lowercase letters, and print the result:

LOWERCASE: <count>
UPPERCASE: <count>

You can use the string.islower() and string.isupper() to check if a string contains lowercase or uppercase characters. The islower() method checks whether a string contains lowercase letters only. If this is the case, it returns True. Otherwise, it returns False:

name = 'Jane'
print(name.islower())
>> False

Stuck? Here's a hint!

In your code you need to iterate over letters of the text and check the case of each letter separately.

for letter in text:
  ...