Question: 1) Implement a function that takes a string as parameter and returns True if the string contains at least one letter and returns False if
1) Implement a function that takes a string as parameter and returns True if the string contains at least one letter and returns False if the string does not contain a letter. To get credit use the in string function and a loop to check the string.
>>> containsLetter("%^*((8**")
False
>>> containsLetter("765EE}}}")
True
2) Implement a function that takes a string as parameter and returns True if the string contains at least one number and returns False if the string does not contain a number. To get credit use the in string function and a loop to check the string.
>>> containsNumber("%^*((8**")
True
>>> containsNumber("AbcdEE}}}")
False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
