Python Programming Quiz

Python Programming Quiz

9th Grade

20 Qs

quiz-placeholder

Similar activities

Grade 12-Python selection&iteration

Grade 12-Python selection&iteration

11th - 12th Grade

15 Qs

python quiz

python quiz

12th Grade

20 Qs

Python Basics Review

Python Basics Review

10th Grade

18 Qs

Python Strings

Python Strings

University

20 Qs

Python - Quiz

Python - Quiz

9th - 11th Grade

17 Qs

Python basics

Python basics

2nd - 9th Grade

20 Qs

Python programming

Python programming

6th - 12th Grade

16 Qs

Python Recap

Python Recap

7th Grade - University

20 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Tracy Mayhead

Used 9+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the print() function in Python?

To display output to the console

To read user input

To create a variable

To define a function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is Python sensitive to whitespace when defining code blocks?

Yes

No

Only in functions

Depends on the operating system

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbol is used to create a list in Python?

( )

[ ]

{ }

< >

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

1st_variable

my-variable

myVariable

my variable

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you start a function definition in Python?

function myFunction():

def myFunction():

create myFunction():

myFunction():

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? x = 5 print(x * 2)

10

5

25

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements assigns the value of 10 to the variable x in Python?

x:=10

let x = 10

x = 10

x ← 10

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?