Question: 1 . At the start of the program create three sets containing: a . EVEN: The set of all even numbers between 0 and 1

1. At the start of the program create three sets containing:
a. EVEN: The set of all even numbers between 0 and 10(i.e.0,2,4,6,8,10)
b. ODD: The set of all odd numbers between 0 and 10(i.e.1,3,4,5,7,9)
c. PRIME: The set of all prime numbers less than 10(i.e.2,3,5,7)
2. Prompt the user to select two sets by name (EVEN, ODD, and/or PRIME). Your program should
accept each name regardless of case (hint use the upper or lower methods).
3. Prompt the user to select one of three set operations using the following characters:
a. d: difference
b. i: intersection
c. u: union
Your program should treat upper and lowercase inputs the same (e.g.I or i" are the same)
4. Apply the selected operation to the two sets indicated (hint case statements may be useful
here), and display the resulting set.
Note: your program should only execute ONCE. We include two examples to illustrate some of the
different types of inputs that are possible

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!