Python-List

Python-List

8th Grade

10 Qs

quiz-placeholder

Similar activities

Arrays & Strings  in programming

Arrays & Strings in programming

8th Grade

14 Qs

UTS PEMROGRAMAN WEB DKV

UTS PEMROGRAMAN WEB DKV

8th Grade

10 Qs

Списки Python + Pygame

Списки Python + Pygame

KG - University

10 Qs

HTML Basics

HTML Basics

8th - 10th Grade

10 Qs

Lists, Subroutines and Sequence in Pseudocode - Python

Lists, Subroutines and Sequence in Pseudocode - Python

1st - 11th Grade

14 Qs

Database Basics

Database Basics

6th - 8th Grade

15 Qs

Cell References Puzzle

Cell References Puzzle

7th - 8th Grade

10 Qs

HTML Basics (Year 8)

HTML Basics (Year 8)

8th Grade

10 Qs

Python-List

Python-List

Assessment

Quiz

Computers

8th Grade

Hard

Created by

harshit shukla

Used 5+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Suppose list1 is [1, 3, 2, 4, 5, 2, 1, 0],

What is list1[-1]?

3

5

1

0

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Suppose list1 is [3, 4, 5, 20, 5], what is

 

print(list1.index(5))

3

2

IndexError: list index out of range

4

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Suppose list1 is [3, 4, 5, 20, 5.0, "5", 1, 3, 5, 5.0],

what is

 

print(list1.count(5))

2

3

4

5

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following would give an error?

lista = []

lista = []*3

lista = [2, 8, 7,]

None of the Above

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after

 

print(list1.[::-2])

[3, 1, 25, 5,

20, 5, 4, 3]

[3, 4, 5, 20, 5,

25, 1, 3]

[3, 25, 20, 4]

[1, 5, 5, 3]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose listExample is [5, 3, 8, 15, 4], what is listExample after

print(listExample.popitem())

AttributeError: 'list' object has

no attribute 'popitems'

[5, 3, 8, 15, 4]

[5, 3, 8, 15]

[3, 8, 15, 4]

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Select the correct options to join two lists in Python.

list1 = [‘a’, ‘b’, ‘c’, ‘d’]
list2 = [‘e’, ‘f’, ‘g’]

Can have multiple correct Answers

newList =

list1 * list2

newList =

list1 + list2

newList.extend

(list1, list2)

newList = extend(list1, list2)

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?