Question: Python (a) Write a function named check_name which takes in two string parameters named: - name (a person's name), and - fave_letter (an alphabetical character)

Python
(a) Write a function named check_name which takes in two string parameters named: - "name" (a person's name), and - "fave_letter" (an alphabetical character) The function should return True iff the given name begins with the given fave_letter You may assume all characters are lowercase (no need to check for uppercase equivalence within the function) Examples of calling this function and the expected output >>check_name 'sephiroth', 's') True >>> check name ('tifa', 's') False (b) Write a function named check_name_count which takes in three parameters named: - "name" (a person's name) and - "fave_letter" (an alphabetical character), and - "num" (an integer value) This function should return True iff the given fave_letter occurs at least num times within the given name Again, you may assume all characters are lowercase (no need to check for uppercase equivalence within the function) Examples of calling this function and the expected output: >>> check_name_count ('sephiroth', 's', 2) False >>check_name_count ('tifa', 't', 1) True >>> check_name_count ('sephisrotsh', 's', 2) True Your functions for both of the above should also have proper, complete docstrings to get full marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
