Computer Science, asked by vedsanisahu835, 9 months ago

Given ``odd = set([1, 3, 5, 7, 9])``
``squares = set([1, 4, 9, 16])``.
What is the value of ``odd ^ squares``?
Select one:
a. set([3, 5, 7])
b. set([1, 3, 4, 5, 7, 9, 16])
c. set([3, 4, 5, 7, 16])
d. set([1, 3, 4, 5, 7, 9, 16])

Answers

Answered by garvsharma20y
1

Answer:

I think it's answer will be b.

Answered by aryansuts01
0

Answer:

''oddsquares''=set([1,9])

To store several items in a single variable, use sets. One of Python's four built-in data types for storing sets of data is Set; the others are List, Tuple, & Dictionary, each with a unique set of features and applications. A set is an unsorted, unalterable*, and uninitialized group.

Explanation:

In Python, a set is a group of distinct, unordered, and modifiable entities. Python has a number of functions to interact using Set. We shall see a list of all the functions that Python offers to work with Set in this post.

A Set is an iterable, changeable, and duplicate-free unsorted collection data type. A set has a highly optimised way for determining whether a certain element is contained in the set, which is its main advantage over a list. This is based on a hash table, a type of data structure. Since collections are not sorted, we cannot use indexes to retrieve objects like we do with lists.

Odd=Set([1,3,5,7,9])

Squares=Set([1,4,9,16])

We must determine the worth of odd^squares

''oddsquares''=set([1,9])

It implies the connection between the two sets when there is.

Therefore,

''oddsquares''=set([1,9])

#SPJ2

Similar questions