Python  Write a program the following: 1. Define two sets x1, and x2, where each of them contain the following: x1 = {1,2,4,5,6} x2= {1,3,4,7} 2. Provide a menu with the following options: 1. Union 2. Intersection 3. Difference 4. Symmetric difference 5. Display sets 6. Exit

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question

Python 

Write a program the following:
1. Define two sets x1, and x2, where each of them contain the following: x1 = {1,2,4,5,6}
x2= {1,3,4,7}
2. Provide a menu with the following options:
1. Union
2. Intersection
3. Difference
4. Symmetric difference

5. Display sets
6. Exit
The program stops once the user enters 6. When the user selects any of the other options, the corresponding operation is performed   and the result is displayed.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT