Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Heres a Python program that fulfills the requirements youve described def getintersectionfirstname l...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started