Question: Use the following code to generate two lists of random numbers >>> #irand is a function given to the students that generates a list of

 Use the following code to generate two lists of random numbers

Use the following code to generate two lists of random numbers >>> #irand is a function given to the students that generates a list of length >>> is the random selection of the integers from 0 to 1m without replacement. >>> det irandin, m) : generate an array of length n made up of random integers Sport random between 0 and without replacement belist (range(n)) berandom. sample (range (m),n) >>># I haven't decided whether to give this to the students or have them do it >>> # thier own. The next steps generate two lists A and B. A and B will be >>># students lists and they will have to convert them to binary and then uset >>> # lists to form a intersect B, A union 3, NOT A given a universal set, A-3, >>> symmetrie difference A XOR B. Still considering Across 3. >>> + Generate A and B >>> A-irand (100, 200); B rand (100, 200) #generate A and B 100 elemets tach >>> A-irand (100, 200): B rand (100, 200) [162, 197, 129, 192, 190, 191, 141, 110, 128, 139, 122, 32, 10, 101, 59, 112, 14 0, 102, 31, 120, 130, 27, 194, 137, 30, 29, 167, 103, 111, 53, 68, 99, 163, 188, 134, 33, 50, 16, 146, 9, 155, 87, 71, 55, 150, 97, 175, 84, 79, 96, 156, 4, 51, 174, 106, 177, 113, 2, 46, 41, 21, 77, 153, 26, 178, 124, 67, 76, 17, 118, 135, 92, 88, 170, 75, 157, 140, 164, 37, 83, 12, 49, 13, 98, 149, 57, 11, 12, 190, 7 2, 58, 199, 102, 180, 15, 152, 40, 171, 63, 80) Form and sort in ascending order the intersection and union of the two sets. Print of the intersection followed by lista and b sorted into ascending order. (This is the only way I can check your output any any reasonable time. Then print of the union of the two sets followed by a and b sorted into ascending order. Given that the universal set is the whole numbers between o and 200 inclusive form and print not A in ascending order. Form and print A-B in ascending order. You can use the built in sort algorithm below and the logical operators weetc but no other built in set functions. >>>> Br istrange (la)) >>> toriin range (la) sort [1] A[ >>> Sort.srt >>> baortlist range (lb)) bar11-3[1] >>>> bort. Bort) . . . . . . . . . . . . . . . . . . ... 18. 1.1.1.1.. . . Use the following code to generate two lists of random numbers >>> #irand is a function given to the students that generates a list of length >>> is the random selection of the integers from 0 to 1m without replacement. >>> det irandin, m) : generate an array of length n made up of random integers Sport random between 0 and without replacement belist (range(n)) berandom. sample (range (m),n) >>># I haven't decided whether to give this to the students or have them do it >>> # thier own. The next steps generate two lists A and B. A and B will be >>># students lists and they will have to convert them to binary and then uset >>> # lists to form a intersect B, A union 3, NOT A given a universal set, A-3, >>> symmetrie difference A XOR B. Still considering Across 3. >>> + Generate A and B >>> A-irand (100, 200); B rand (100, 200) #generate A and B 100 elemets tach >>> A-irand (100, 200): B rand (100, 200) [162, 197, 129, 192, 190, 191, 141, 110, 128, 139, 122, 32, 10, 101, 59, 112, 14 0, 102, 31, 120, 130, 27, 194, 137, 30, 29, 167, 103, 111, 53, 68, 99, 163, 188, 134, 33, 50, 16, 146, 9, 155, 87, 71, 55, 150, 97, 175, 84, 79, 96, 156, 4, 51, 174, 106, 177, 113, 2, 46, 41, 21, 77, 153, 26, 178, 124, 67, 76, 17, 118, 135, 92, 88, 170, 75, 157, 140, 164, 37, 83, 12, 49, 13, 98, 149, 57, 11, 12, 190, 7 2, 58, 199, 102, 180, 15, 152, 40, 171, 63, 80) Form and sort in ascending order the intersection and union of the two sets. Print of the intersection followed by lista and b sorted into ascending order. (This is the only way I can check your output any any reasonable time. Then print of the union of the two sets followed by a and b sorted into ascending order. Given that the universal set is the whole numbers between o and 200 inclusive form and print not A in ascending order. Form and print A-B in ascending order. You can use the built in sort algorithm below and the logical operators weetc but no other built in set functions. >>>> Br istrange (la)) >>> toriin range (la) sort [1] A[ >>> Sort.srt >>> baortlist range (lb)) bar11-3[1] >>>> bort. Bort) . . . . . . . . . . . . . . . . . . ... 18

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!