Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Tuples

Total questions: 12

Worksheet time: 12mins

Name
Class
Date
1.

Choose the correct about Tuples

a)

Collection of items which are ordered

b)

tuples cannot be changed

c)

tuples uses square brackets

d)

values of tuples can be accessed by indexing

2.

Choose the correct syntax of Tuple

a)

tuple=[200,50]

b)

tuple=(200,50)

c)

tuple={200,50}

3.

How to get the index of any value of tuple

a)

tuple.index(value)

b)

tuple.index[value]

4.

tuple1=(5,25,15,10,30)

print(max(tuple1))


What is printed in console?

(a)  

5.

tuple2=('p','s','r','d','b')

print(max(tuple2))

(a)  

6.

tuple1=(5,25,15,10,30, 'abc', 'pqr',2010)

print(max(tuple1))

a)

Type error: max and min are not supported between instances of integer and string

b)

2010, pqr

c)

2010

d)

pqr

7.

True about max and min of tuples

a)

can be applied with tuples having only integers or only alphabets

b)

cannot be applied with tuples having only integers or only alphabets

c)

cannot be applied to the mixed datatypes values in a tuple

8.

tuple1 = (1,5,7,3,8)


tuple2=('c', 'w', 'f', 'q', 't')


tuple3=(1,2,3,4, 'c','g', 'u', 2010, "apple")


max() for above tuple gives?

a)

max(tuple1) returns 8

b)

max(tuple2) returns t

c)

max(tuple3) returns TypeError, as it contains mixed datatype

9.

Choose odd one out

a)

Array

b)

Tuple

c)

List

10.

tuple3=(1,2,3,4, 'c','g', 'u', 2010, "apple")


print(tuple3.index(4)) returns?

a)

3

b)

4

c)

c

d)

none

11.

tuple2=('c', 'w', 'f', 'q', 't')


print(tuple2.index('w'))

Datatype of the output will be in?

a)

string

b)

integer

12.

tuple2=('d', 'w', 'c', 'f', 'q', 'yellow','t')

a)

min(tuple2) returns c

b)

max(tuple2) returns yellow

c)

max(tuple2) returns t

d)

min(tuple2) returns d