COMP Flashcards

1
Q

counts the number of occurrences of an item in a tuple

A

count

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

_____ uses parentheses()

A

tuple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

_____ uses curly brackets{}

A

set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

it holds key:value pair

A

dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

used to store data values like a map

A

dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

an ordered collection of python objects, and it is immutable

A

tuple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

arithmetic operator that returns the remainder of the division

A

modulus %

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

modifying set that is used to add single element

A

add()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

an unordered collection of data type that is iterable, mutable, and has no duplicate elements

A

set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

unordered collection of data values

A

dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

it returns the length of a tuple

A

len

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

modifying set that is used to add multiple elements

A

update()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

modifying set that is used to remove all items in a set

A

clear()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

sort the elements in ascending order

A

sorted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

it returns the total of a num

A

sum

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

arithmetic operator that returns the results into a whole number

A

floor division //

17
Q

modifying set that is used to discard the element

A

discard()

18
Q

arithmetic operator that is raised to the power

A

exponentiation **

19
Q

it returns the largest element in a tuple

A

max

20
Q

modifying set that is used to remove the element

A

remove()

21
Q

it returns the smallest element in a tuple

A

min

22
Q

arithmetic operator that add the two operands

A

addition +

23
Q

arithmetic operator that divide the two operands

A

division /

24
Q

arithmetic operator that subtract two operands

A

subtraction -

25
Q

arithmetic operator that multiply two operands

A

multiplication *