Question: Write a program that have the following functions: A main function that read a person first and last name from keyboard. The main function
Write a program that have the following functions: A main function that read a person first and last name from keyboard. The main function calls the below functions. A function that takes first and last names and returns a set of the unique common letters in the first and last names (intersection). A function that takes first and last names and returns a set of all unique letters in the first and last names (union). A function that takes first and last names and returns a set of all unique letters in first name but not in last name and all unique letters in last name but not in first name (symmetric difference). Here is a sample run: Enter first name: Ernest Enter last name: Hemingway Intersection: {'e', 'n'} Union: {'m', 'i', 't', 'e', 'a', 'r', 'E', 'H', 'g', 'w', 'n', 's', 'y'} Symmetric: {'m', 'i', 'a', 'y', 't', 'r', 'E', 'H', 'g', 's', 'w'}
Step by Step Solution
There are 3 Steps involved in it
Heres a Python program that fulfills the requirements youve described def getintersectionfirstname l... View full answer
Get step-by-step solutions from verified subject matter experts
