subject

What is wrong in this code? My objective is to derive a function that prints the no of lowercase characters and uppercase characters.
I tried to find out but couldn't find out please help
def determine_upper_lower(value):
upper_case = 0
lower_case = 0

for i in value:
if i. isupper():
upper_case = upper_case + 1

elif i. islower():
lower_case = lower_case + 1

result = 'the number of uppercase letters are ' + str(upper_case) + ' and the number of lowercase letters are ' + str(lower_case)
return result

sample_string = 'Quick brown fox jumped over the lazy Dog'
print(determine_upper_lower(sample_ string))

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:30, tfaulk2884
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
image
Computers and Technology, 23.06.2019 09:20, lovely222
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
image
Computers and Technology, 23.06.2019 12:00, trippie4life
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
image
Computers and Technology, 23.06.2019 13:50, mrfishyyyy
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
You know the right answer?
What is wrong in this code? My objective is to derive a function that prints the no of lowercase ch...

Questions in other subjects:

Konu
Mathematics, 20.09.2019 19:00