Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 (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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started