tuples in python

tuples in python

11th Grade

15 Qs

quiz-placeholder

Similar activities

Python Unit  8 Quiz

Python Unit 8 Quiz

9th - 12th Grade

15 Qs

CodeHS Basic Data Structures in Python

CodeHS Basic Data Structures in Python

9th Grade - University

10 Qs

CPO Lesson 1.3 p1

CPO Lesson 1.3 p1

9th - 12th Grade

10 Qs

DevNet Express

DevNet Express

10th Grade - Professional Development

11 Qs

Data Handling in Python

Data Handling in Python

11th Grade

10 Qs

Computer Science Tuples

Computer Science Tuples

11th Grade

15 Qs

Python Data Types Quiz

Python Data Types Quiz

10th Grade - University

20 Qs

11th Class Python Basics

11th Class Python Basics

11th Grade

10 Qs

tuples in python

tuples in python

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Kanika Ahluwalia

Used 48+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 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

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)

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:-1]

(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, 8, 9)

>>> for i in range(0, len(t), 2):

print(t[i])

[2,3,9]

[1,2,4,3,8,9]

[1,4,8]

Error

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?


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

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

>>>t1 < t2

True

False

Error

None

7.

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

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?