Python Practice 5 - Tuple

Python Practice 5 - Tuple

Professional Development

10 Qs

quiz-placeholder

Similar activities

tech studie plus movies

tech studie plus movies

KG - Professional Development

11 Qs

Bible Knowledge

Bible Knowledge

Professional Development

10 Qs

Guess what

Guess what

Professional Development

10 Qs

The Tale of Peter Rabbit

The Tale of Peter Rabbit

KG - Professional Development

10 Qs

Quiz

Quiz

Professional Development

10 Qs

Acts ch-8

Acts ch-8

5th Grade - Professional Development

10 Qs

Departmental Contest Seg.2

Departmental Contest Seg.2

Professional Development

15 Qs

sunday school test

sunday school test

KG - Professional Development

10 Qs

Python Practice 5 - Tuple

Python Practice 5 - Tuple

Assessment

Quiz

Other

Professional Development

Medium

Created by

Assoc.Prof,IT Chennai

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a Python tuple?

[1, 2, 3]

(1, 2, 3)

{1, 2, 3}

{}

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose t = (1, 2, 4, 3), which of the following is incorrect?

print(t[3])

t[3] = 45

print(max(t))

print(len(t))

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code?

>>>t=(1,2,4,3)

>>>t[1:3]

(1, 2)

(1, 2, 4)

(2, 4)

(2, 4, 3)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code?

>>>t=(1,2,4,3)

>>>t[1:-1]

(1, 2)

(1, 2, 4)

(2, 4)

(2, 4, 3)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code?

>>>t = (1, 2)

>>>2 * t

(1, 2, 1, 2)

[1, 2, 1, 2]

(1, 1, 2, 2)

[1, 1, 2, 2]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code?

>>>my_tuple = (1, 2, 3, 4)

>>>my_tuple.append( (5, 6, 7) )

>>>print len(my_tuple)


1

2

5

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code snippet?

d = {"john":40, "peter":45}

print(d)

“john”, 40, “peter”, 45

{‘john’: 40, ‘peter’: 45}

40 and 45

d = (40:”john”, 45:”peter”)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?