python data structure 1

python data structure 1

KG - 12th Grade

12 Qs

quiz-placeholder

Similar activities

PythonBasic

PythonBasic

University

15 Qs

Python_IOSC

Python_IOSC

University

15 Qs

Python Dictionaries

Python Dictionaries

University

10 Qs

Python Lists and Dictionaries

Python Lists and Dictionaries

11th - 12th Grade

7 Qs

Python Dictionary

Python Dictionary

University

10 Qs

Grade 8 Review

Grade 8 Review

8th Grade

15 Qs

PYTHON ::04

PYTHON ::04

University - Professional Development

17 Qs

6.1 Guided Notes - Dictionary and Data Structures Quiz

6.1 Guided Notes - Dictionary and Data Structures Quiz

9th Grade

15 Qs

python data structure 1

python data structure 1

Assessment

Quiz

Computers, Science

KG - 12th Grade

Hard

Created by

guanxiong sun

Used 23+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the colors[2] expression?

'burnt sienna'

'green'

It causes a run-time error.

'red'

'blue'

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

How would you access the element 'red' from the above list?

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the result of the "yellow in colors" expression?

False

True

3

Errors

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

x = [10, [3.141, 20, [30, 'baz', 2.718]], 'foo']

What is the expression that returns the 2.718?

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

x = [10, [3.141, 20, [30, 'baz', 2.718]], 'foo']

What is the expression that returns the 'z' in 'baz'?

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What’s the main difference between Python lists and tuples?

Lists are faster and tuples are slower.

Lists are immutable and tuples are mutable.

Lists are mutable and tuples are immutable.

Correct

Lists can hold any data type and tuples can only contain int and str objects.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Create a variable to store some information of James. We need to store his name "James", his email "james@google.com", his mobile 07746330330.

What data structure would you like to use?

List

Dictionary

Tuple

Set

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?