Question: help ASAP 3.12 LAB: Set basics Given the user inputs complete a program that does the following tasks Define a set, fruits, containing the user
3.12 LAB: Set basics Given the user inputs complete a program that does the following tasks Define a set, fruits, containing the user inputs my_fruit, my fruit and my_fruit3 Add the user inputs your_fruit and your_fruit2. to fruits Add the user input their_fruit to fruits Add your_fruit to fruits Remove my fruit from fruits Observe the output of each print statement carefully to understand what was done by each task of the program Note: For testing purposes, sets are printed using sorted for comparison as in the book's examples Exif the input is apple peach lemon apple pear plum the output is ['apple', lemon', 'peach'] L'apple', 'lemon', peach', 'pear'l ['apple lemon', 'peach' 'pear') "plum' I'apple', 'lemon 'peach', 'pear', 'plum' L'lemon', peach', 'pear', 'plum'] 4/ 10 LAD ACTIVITY 3.121: LAB. Set basics main.py Load default teplate my fruiti. input() 2 my_fruit2 input() 3 ny_fruits input() 5 your_fruiti input) your_fruita input() their_fruit = input() 9 10.1. TODO: Define a set, fruits, containing my fruits, my frutta, and my_frunta 11 12 print sorted (fruits)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
