Learn

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")

Sign up to start coding

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Already have an account?