Python 2 Reference Guide Quiz

Python 2 Reference Guide Quiz

12th Grade

26 Qs

quiz-placeholder

Similar activities

MEDIA LITERACY

MEDIA LITERACY

12th Grade

25 Qs

arrays and strings in java

arrays and strings in java

12th Grade

25 Qs

String

String

10th Grade - University

30 Qs

Object and Coding Concepts Quiz

Object and Coding Concepts Quiz

7th Grade - University

21 Qs

Gmetrix Python

Gmetrix Python

9th Grade - Professional Development

31 Qs

python loop 7th

python loop 7th

7th Grade - University

25 Qs

Computer Programming Chapter 3 Review

Computer Programming Chapter 3 Review

10th - 12th Grade

21 Qs

InDesign q1

InDesign q1

9th - 12th Grade

25 Qs

Python 2 Reference Guide Quiz

Python 2 Reference Guide Quiz

Assessment

Quiz

Computers

12th Grade

Easy

Created by

Jennie Phipps

Used 2+ times

FREE Resource

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a for loop in Python?

To repeat a block of code for each item in a list

To define a function

To check if a condition is true

To access items in a dictionary

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Indentation isn't important in Python.

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When you are indexing, you start counting at ____, but when you are measuring length you start at _______.

0, 1

1, 0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lists use ______, while dictionaries use ________, and tuples use _________.

(), {},[]

[], {},()

{},[],()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the round() function do in Python?

Returns the smallest number in a list

Rounds a number to the nearest integer

Rounds a number to the specified amount of decimal points

Returns the largest number in a list

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a while loop in Python?

To define a function

To repeat a block of code for each item in a list

To access items in a dictionary

To check if a condition is true

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of function parameters in Python?

To access items in a list

To loop through a dictionary

To pass data into a function

To define a function

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?