Data Structures

Data Structures

8th Grade

9 Qs

quiz-placeholder

Similar activities

may tinh va chuong trinh may tinh

may tinh va chuong trinh may tinh

8th Grade

10 Qs

Lekcja14 7-8

Lekcja14 7-8

7th - 8th Grade

13 Qs

Revision Quiz 2 - Information Technology

Revision Quiz 2 - Information Technology

7th - 8th Grade

10 Qs

Табличні величини та алгоритми їх опрацювання.

Табличні величини та алгоритми їх опрацювання.

5th - 11th Grade

14 Qs

Операторы и функции языка Pascal

Операторы и функции языка Pascal

1st - 10th Grade

10 Qs

Thunder

Thunder

KG - University

10 Qs

Programowanie R2 kartkówka

Programowanie R2 kartkówka

8th Grade

12 Qs

Tiger Trivia 31-40

Tiger Trivia 31-40

6th - 8th Grade

10 Qs

Data Structures

Data Structures

Assessment

Quiz

Computers

8th Grade

Hard

Created by

Seth Halpern

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...

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is the best description of a list in Python?

A list is a collection of data that has an order and can be changed

A list is a lot of variables

A list is used for shopping

A list is a collection of data that cannot hold duplicated data and cannot be changed

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is the correct code for creating a list of names?

nameList = John, Harry, Jesse, John, Harry, Harry

nameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry")

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

nameList = [John, Harry, Jesse, John, Harry, Harry]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these pieces of code would return the name "Harry" from the following list?

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

nameList()

nameList[1]

NameList(4)

nameList["4"]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The list needs one more name added to the end - "Felipe". Which piece of code below would do this?

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

nameList.append(Felipe)

append(nameList,"Felipe")

nameList.append["Felipe",7]

nameList.append("Felipe")

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for creating a list in Python?

{}

[]

||

()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

big_list = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]

What command will count the total number of elements in this list?

print(len(big_list))

print(len("big_list"))

big_list.pop(1)

big_list.append(1)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

names=["Joe", "Tom", "Sam", "Bill"]

What command will add "Tim" between "Sam" and "Bill"?

names.pop(3,"Tim")

names.append(3,"Tim")

names.insert(3,"Tim")

names.remove(3,"Tim")

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

values = [5, 3, 3, 7, 10,3]

values.remove(3)

What is the output?

[3,3,3]

[5,3,3,10,3]

[5,7,10]

[5,3,7,10,3]

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

values = [5, 3, 7, 10,20]

values.pop(3)

What is the output?


[5,3,7,10,20,3]

[5,3,7,20]

[5,7,10,20]

[10,20]

Discover more resources for Computers