Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 . 1 0 LAB: Set basics Given the user inputs, complete a program that does the following tasks: Define a set, fruits, containing the

2.10 LAB: Set basics
Given the user inputs, complete a program that does the following tasks:
Define a set, fruits, containing the user inputs myFruit1, myFruit2, and myFruit3.
Add the user input theirFruit to fruits.
Find the intersection of fruits and yourFruit1 and yourFruit2
Remove myFruit1 from fruits.
Note: For testing purposes, sets are printed using sorted() for comparison.
Ex: If the input is:
apple
peach
lemon
apple
pear
plum
the output is:
['apple', 'lemon', 'peach']
['apple', 'lemon', 'peach', 'plum']
['apple']
['lemon', 'peach', 'plum']
546386.3959570.qx3zqy7
LAB ACTIVITY
2.10.1: LAB: Set basics
0/2
main.py
Load default template...
Develop mode
Submit mode
Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.
Enter program input (optional)
apple
peach
lemon
apple
pear
plum
Run program
Input (from above)
main.py
(Your program)
Output (shown below)
Program output displayed here
Coding trail of your work
What is this?
History of your effort will appear here once you begin working on this zyLab.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

Do you think physicians should have unions? Why or why not?

Answered: 1 week ago