Session 5

Session 5

University

13 Qs

quiz-placeholder

Similar activities

DFC20283 CHAPTER 5 (5.1.6-5.1.9)

DFC20283 CHAPTER 5 (5.1.6-5.1.9)

University

10 Qs

Python_Quiz_1

Python_Quiz_1

University

10 Qs

Tin 7 Bài 8

Tin 7 Bài 8

7th Grade - University

10 Qs

Keyboard Shortcuts

Keyboard Shortcuts

5th Grade - University

11 Qs

OOP-Q1

OOP-Q1

University

10 Qs

Ôn tập HKI Công nghệ - Khối 4

Ôn tập HKI Công nghệ - Khối 4

4th Grade - University

10 Qs

Java_Quiz_Part_2

Java_Quiz_Part_2

University

12 Qs

NoSQL Concepts 2

NoSQL Concepts 2

University

10 Qs

Session 5

Session 5

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Mimansha Ramcharn

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

13 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following are true of Python lists?

All elements must be of the same type

These represent the same list: ['a', 'b', 'c'] and ['c', 'a', 'b']

A list may contain any type except another list

There is no conceptual limit to the size of a list

A given object may appear in a list more than once

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

List a is defined as follows: a = [1, 2, 3, 4, 5]

Statements that remove the middle element 3 from a:

a.remove(3)

del a[2]

a[2] = [ ]

a[2:2] = [ ]

a[2:3] = [ ]

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

List a is defined as follows: a = ['a', 'b', 'c']

To add 'd' and 'e' to the end, so that the answer is a = ['a', 'b', 'c', 'd', 'e']

Which statements are true?

a += ['d', 'e']

a.append(['d', 'e'])

a = ['a', 'b', 'c', 'd', 'e']

a[len(a):] = ['d', 'e']

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which function counts elements in a list?

find()

index()

count()

len()

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Let list1 = [2, 4, 6, 8, 10].

What will print(list1[-2]) result in?

6

8

error

-2

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which statement is NOT correct?

A list is mutable

The append function is used to add an element

A tuple is immutable

The extend function adds an element to a tuple

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Can lists contain tuples and vice versa?

Yes

No

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?