Search Header Logo

Tuples Part B

Authored by shilpa keesara

Computers

11th - 12th Grade

Used 3+ times

Tuples Part B
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the type of the following variable

aTuple = ("Orange")

print(type(aTuple))

list

tuple

array

str

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code

aTuple = (100, 200, 300, 400, 500)

aTuple[1] = 800

print(aTuple)

TypeError

(100, 800, 200, 300, 400, 500)

(800, 100, 200, 300, 400, 500)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following tuple operation

aTuple = (100, 200, 300, 400, 500)

aTuple.pop(2)

print(aTuple)

(100, 200, 400, 500)

(100, 300, 400, 500)

Error

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code

aTuple = (100, 200, 300, 400, 500)


print(aTuple[-4:-1])

IndexError: tuple index out of range

(200, 300, 400)

(100,300,500)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following

aTuple = "Yellow", 20, "Red"

a, b, c = aTuple

print(a)

(‘Yellow’, 20, ‘Red’)

TyepeError

Yellow

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following

tuple1 = (1120, 'a')

print(max(tuple1))

TypeError

1120

‘a’

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A Python tuple can also be created without using parentheses

False

True

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?