question archive QUESTION 1) What is the output of print(tuple[2:]) if tuple = ( 'abcd', 786 , 2
Subject:Computer SciencePrice:4.87 Bought7
QUESTION 1) What is the output of print(tuple[2:]) if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )?
( 'abcd', 786 , 2.23, 'john', 70.2 ) |
||
abcd |
||
(786, 2.23) |
||
(2.23, 'john', 70.2) |
QUESTION 2
What is the output of print(tuple[-3:]) if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )?
( 'abcd', 786 , 2.23, 'john', 70.2 ) |
||
abcd |
||
(786, 2.23) |
||
(2.23, 'john', 70.2) |
QUESTION 3
when referencing the first index value within a list, in reference to the last element’s position, we begin with an index of:
0 |
||
1 |
||
-1 |
||
any value |
QUESTION 4
Dictionaries use what to uniquely identify each of its elements.
name |
||
index |
||
value |
||
fractional index |
Purchased 7 times