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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Write a program that asks the user to enter the name of an input file. if the file does not exist, the program should prompt the user to enter the file name again. if the user types quit in any uppercase/lowercase combinations, then the program should exit without any further output.
Answers: 3
You know the right answer?
Write a Python program to do the following: a. Generate 5 random integers between 1 and 10, inclus...
Questions
question
Mathematics, 20.12.2020 06:10
question
Health, 20.12.2020 06:10
question
Mathematics, 20.12.2020 06:10
question
Mathematics, 20.12.2020 06:20
question
Social Studies, 20.12.2020 06:20
Questions on the website: 13722361