Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN PYTHON def print_num_digits_and_letters(str): Count the numbers, letters and other characters in a string. Finish this function which counts the number of 1) numbers,
IN PYTHON def print_num_digits_and_letters(str): """ Count the numbers, letters and other characters in a string. Finish this function which counts the number of 1) numbers, 2) English letters and 3) all other characters (as the 3rd category) in a given string str as parameter. This function does not have an explicit return value. You should use "continue" at least once in the char-by-char processing. For example, if this function is called with print_num_digits_and_letters("Python rocks") The output produced by this function should be: There are 0 number, 11 letters and 1 special character in this string. """
#------------------------The code below is for testing purpose--------------------- print_num_digits_and_letters("Walden is a book by noted transcendentalist Henry David Thoreau. ") print_num_digits_and_letters(""" Walden Pond is a lake in Concord, Massachusetts in the United States. A famous example of a kettle hole, it was formed by retreating glaciers 10,00012,000 years ago. """)
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