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

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!