2.10 LAB: Set basics Given the user inputs, complete a program that does the following tasks:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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, myFruit 2, and my Fruit3. Add the user input theirFruit to fruits. Find the intersection of fruits and your Fruit1 and your Fruit2 Remove my Fruit1 from fruits. Note: For testing purposes, sets are printed using sorted (0) for comparison. Ex: If the input is: apple peach lemon apple pear plum the output is l'apple', 'lemon', 'peach'] ['apple', 'lemon', 'peach', 'plum'] ['apple'] ['lemon', 'peach', 'plum'] 406023.2296122.qx3zay7 LAB ACTIVITY 2.10.1; Set basics 0/2 apple peach lemon apple pear plum the output is I'apple', 'lemon', 'peach'] ['apple', 'lemon', 'peach', 'plum'] ['apple'] ['lemon', 'peach', 'plum'] 4360202295122q-Saay? LAB ACTIVITY 2.10.1: Set basics 1 myFruit1= input() 2 myFruit2 = input () 3 myFruit3 =input() 4 5 your Fruit1 input() 6 your Fruit2 =input() 7 8 theirFruit = input() 9 10 # Define a set, fruits, containing myFruiti, myFruit2, and myFruit3 11 # Your code here 12 print (sorted (fruits)) 13 14 # Add theirFruit to fruits main.py 15 # Your code here 16 print (sorted (fruits)) 17 18 # Find the intersection of fruits and yourFruit1 and yourFruit2 19 fruitsInter = # Your code here 20 print (sorted (fruits Inter)) 21 22 # Remove myFruit1 from fruits 23 # Your code here 24 print (sorted (fruits)) 0/2 Load default template... 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, myFruit 2, and my Fruit3. Add the user input theirFruit to fruits. Find the intersection of fruits and your Fruit1 and your Fruit2 Remove my Fruit1 from fruits. Note: For testing purposes, sets are printed using sorted (0) for comparison. Ex: If the input is: apple peach lemon apple pear plum the output is l'apple', 'lemon', 'peach'] ['apple', 'lemon', 'peach', 'plum'] ['apple'] ['lemon', 'peach', 'plum'] 406023.2296122.qx3zay7 LAB ACTIVITY 2.10.1; Set basics 0/2 apple peach lemon apple pear plum the output is I'apple', 'lemon', 'peach'] ['apple', 'lemon', 'peach', 'plum'] ['apple'] ['lemon', 'peach', 'plum'] 4360202295122q-Saay? LAB ACTIVITY 2.10.1: Set basics 1 myFruit1= input() 2 myFruit2 = input () 3 myFruit3 =input() 4 5 your Fruit1 input() 6 your Fruit2 =input() 7 8 theirFruit = input() 9 10 # Define a set, fruits, containing myFruiti, myFruit2, and myFruit3 11 # Your code here 12 print (sorted (fruits)) 13 14 # Add theirFruit to fruits main.py 15 # Your code here 16 print (sorted (fruits)) 17 18 # Find the intersection of fruits and yourFruit1 and yourFruit2 19 fruitsInter = # Your code here 20 print (sorted (fruits Inter)) 21 22 # Remove myFruit1 from fruits 23 # Your code here 24 print (sorted (fruits)) 0/2 Load default template...
Expert Answer:
Answer rating: 100% (QA)
myFruit1 input myFruit2 input myFruit3 input yourFruit1 input you... View the full answer
Related Book For
Accounting Information Systems
ISBN: 9780132871938
11th Edition
Authors: George H. Bodnar, William S. Hopwood
Posted Date:
Students also viewed these programming questions
-
At the beginning of 2020 Corp A issued at 96.4 a $10,000,000, 10 year note payable to Corp B at the rate of 6.2%. The debt had an annual coupon due December 31st, and Corp A made the first 2...
-
1.$100,000 is invested for five years at a quarterly compounded rate of 2.25%.What are the proceeds? 2.What is the present value of $10,500 in 2.5 years at 3% monthly compounded discount rate? 3.What...
-
Let f(x) = ax2 + bx + c, where a, b, and c are elements of the field F. Let d EF. Let a2, ai, and ao be the coefficients of the powers of x -- d in the representation f(x) = a2(x d)2 + ai(x d) + ao....
-
Explain the nature of stress at work Describe the health consequences of stressful work Explain how to use hardiness theory to reduce stress List three ways to use Banduras self-efficacy theory to...
-
When checking the pressure in tires, some air escapes. Why doesn't Heisenberg's uncertainty principle apply here?
-
You have been asked about the appropriate use of data in policy decisions by officials from a new central bank in a country that is economically similar to the United States. These officials...
-
It is known that 1 liter (L) is 0.264172 gallons (gal). Use this to convert 14 liters into gallons.
-
The payroll of YellowCard Company for September 2013 is as follows. Total payroll was $480,000, of which $110,000 is exempt from Social Security tax because it represented amounts paid in excess of...
-
Jurvin Enterprises is a manufacturing company that had nobeginning inventories. A subset of the transactions that itrecorded during a recent month is shown below.$75,600 in raw materials were purc 2...
-
Kofi Allon, who is 32 years old and single, is employed as a technical consultant for a large electronics distributor. He lives at 678 Birch Street, LaMesa, CA 91941. Kofi's Social Security number is...
-
Given the following information answer the question. Accounts receivable Inventory Net plant and equipment Total assets 900,000 427,000 591,000 $2,022,000 a. Compute the following: (Round the final...
-
Describe the most important capital budgeting techniques and how they are used to arrive at investment decisions. Name at least two capital budgeting techniques (for example, NPV, IRR, Payback...
-
Discuss the financial system design and which design is good for India - Which is best for Indiaa Market based financial system, or a bank based financial system?
-
The Musicians' Guild has 949 members and three representatives. Calculate the Huntington-Hill number for the Musicians' Guild. What is the Huntington-Hill number for the Musicians' Guild? (Round to...
-
I am to set up a money market hedge for a small firm, for the interest rate, should I look for central bank interest rate, money market rate, or the bank lending/deposit rate?
-
A steam condenser employed in a power plant handles 35,000 kg of dry air per hour and saturated steam at 50 C. The cooling water enters the condenser at 15 C and leaves at 25 C. The tubes (made of...
-
I'm having problems solving these problems especially the last one.
-
The Ranch 888 Noodle Company sells two types of dried noodles:ramen, at $6.50 per box, and chow fun, at $7.70 per box. So farthis year, the company has sold a total of 110,096 boxes ofnoodles,...
-
Distinguish between job- order costing and process costing.
-
You are the assistant to the information security director. Your director is interested in hiring a new group of IT staff professionals. Required a. Write a report to your director explaining the...
-
Until recently, Amalgamated Gas employed a batch- processing system for recording the receipt of customer payments. The following narrative and Figure describe the procedures involved in this system....
-
The bank columns in the cash book for June 19X7 and the bank statement for that month for C Grant are as follows: You are required to: (a) Write the cash book up to date to take the above into...
-
The bank statement for G Greene for the month of March 19X6 is: You are to: (a) Write the cash book up to date, and (b) Draw up a bank reconciliation statement as on 31 March 19X6. 19X6 Mar 1 Dr Cr...
-
Following is the cash book (bank columns) of E Flynn for December 19X7: You are required to: (a) Write the cash book up to date to take the necessary items into account, and (6) Draw up a bank...
Study smarter with the SolutionInn App