Question: HOW DO YOU DO THIS OMG Write a function called get_letters_digits (word) that takes a string as a parameter and returns a two-element tuple containing

 HOW DO YOU DO THIS OMG Write a function called get_letters_digits

HOW DO YOU DO THIS OMG

Write a function called get_letters_digits (word) that takes a string as a parameter and returns a two-element tuple containing the number of alphabetic characters in word and the number of numeric characters in word as the first and second elements respectively. Hint: the string methods isalpha and isdigit might be be useful. For example: Test Result result = get_letters_digits("CS101 is fun!") print (result) (7,3) (16, 0) result = get_letters_digits ("Happy programming") print(result)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!