Session 5

Session 5

University

13 Qs

quiz-placeholder

Similar activities

Pengenalan Excel - Kelas 10

Pengenalan Excel - Kelas 10

10th Grade - University

10 Qs

ԹԳՀԳ

ԹԳՀԳ

7th Grade - University

10 Qs

SOAL MID SEMESTER INFORMATIKA

SOAL MID SEMESTER INFORMATIKA

6th Grade - University

10 Qs

học Quản Trị Tri Thức chưa người đẹp??

học Quản Trị Tri Thức chưa người đẹp??

University

10 Qs

MongoDB Concepts 2

MongoDB Concepts 2

University

10 Qs

QUIZ-group5

QUIZ-group5

University

10 Qs

Мэдээллийн технологи

Мэдээллийн технологи

8th Grade - University

10 Qs

Quiz sobre P5.js e JavaScript

Quiz sobre P5.js e JavaScript

1st Grade - University

8 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?