Python - List and Tuples

Python - List and Tuples

Assessment

Flashcard

Computers

11th - 12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

20 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the output of the following piece of code when executed in Python shell?
>>> a=("Check")*3
>>> a

Back

(‘CheckCheckCheck’)

2.

FLASHCARD QUESTION

Front

Is the following piece of code valid?
>>> a=(1,2,3,4)
>>> del a

Back

Yes, the entire tuple is deleted

3.

FLASHCARD QUESTION

Front

What type of data is: a=[(1,1),(2,4),(3,9)]?

Back

List of tuples

4.

FLASHCARD QUESTION

Front

Which of the following is true for a tuple? Options: Tup = 1,2,3, Tup = (""1,"2), Tup = (1,2,3,4), None of the above

Back

Tup = (1,2,3,4)

5.

FLASHCARD QUESTION

Front

Result of the program above is

Back

('1', '2', '3', '4', '5')

6.

FLASHCARD QUESTION

Front

Which statement replaces the second element ('bar') in the tuple t = ('foo', 'bar', 'baz') with the string 'qux'? Options: t[1] = 'qux', t(1) = 'qux', t[1:1] = 'qux', error

Back

error

7.

FLASHCARD QUESTION

Front

If list=[17,23,41,10] then list.append(32) will result

Back

[17,23,41,10,32]

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?