Learn
Code Challenge: String Methods
Check Name

check_for_name()

Instructions

1.

Write a function called check_for_name that takes two strings as parameters named sentence and name. The function should return True if name appears in sentence in all lowercase letters, all uppercase letters, or with any mix of uppercase and lowercase letters. The function should return False otherwise.

For example, the following three calls should all return True:

check_for_name("My name is Jamie", "Jamie") check_for_name("My name is jamie", "Jamie") check_for_name("My name is JAMIE", "Jamie")
Folder Icon

Sign up to start coding

Already have an account?