subject

Write a Python program to do the following: a. Generate 5 random integers between 1 and 10, inclusive. Store the random integers in a set named set1. Display the set. Please note that the set may have less than 5 elements because some of the random integers generated may be redundant.
b. Generate 5 random integers between 1 and 10, inclusive. Store the random integers in another set named set2. Display the set. Please note that the set may have less than 5 elements because some of the random integers generated may be redundant.
c. Find and display the union of set1 and set2.
d. Use set comprehension to select odd numbers from the union and store them in a set. Display this set.
e. Find and display the intersection of set1 and set2.
f. Find and display the symmetric difference of set1 and set2.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:30, gabriieldelacruz16
What “old fashioned” features of checking accounts is p2p replacing
Answers: 3
image
Computers and Technology, 23.06.2019 21:30, jayybrain6337
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
image
Computers and Technology, 23.06.2019 23:00, GreenHerbz206
Computer programming is one type of what career
Answers: 1
image
Computers and Technology, 24.06.2019 05:30, lexie2751
How do i get rid of my member ship for
Answers: 2
You know the right answer?
Write a Python program to do the following: a. Generate 5 random integers between 1 and 10, inclus...

Questions in other subjects:

Konu
Mathematics, 17.10.2019 15:50
Konu
Mathematics, 17.10.2019 15:50