Data Structures

Data Structures

8th Grade

9 Qs

quiz-placeholder

Similar activities

Cascading Style Sheets

Cascading Style Sheets

8th - 12th Grade

11 Qs

Nhập môn HTML

Nhập môn HTML

6th - 9th Grade

13 Qs

Remedial TIK Kelas 8

Remedial TIK Kelas 8

8th Grade

10 Qs

Technology Week HTG Quiz - Monday

Technology Week HTG Quiz - Monday

7th - 12th Grade

10 Qs

TIN 6 THU NHẬN THÔNG TIN

TIN 6 THU NHẬN THÔNG TIN

6th - 9th Grade

12 Qs

Module 4 Revision

Module 4 Revision

2nd - 8th Grade

10 Qs

3Per Evaluación Final Tecnología e Informática 9

3Per Evaluación Final Tecnología e Informática 9

6th - 8th Grade

13 Qs

Cha-ching 2

Cha-ching 2

1st Grade - University

8 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")

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?