Python Programming Quiz

Python Programming Quiz

9th Grade

20 Qs

quiz-placeholder

Similar activities

Python

Python

11th Grade

20 Qs

Python Basics

Python Basics

8th - 12th Grade

23 Qs

Python Basic II

Python Basic II

11th Grade - University

20 Qs

Python Basics 1

Python Basics 1

University

20 Qs

Python Quiz 1

Python Quiz 1

1st - 12th Grade

18 Qs

Programming Quiz 4

Programming Quiz 4

9th - 10th Grade

20 Qs

Python - Assessment Week

Python - Assessment Week

8th - 9th Grade

19 Qs

EXCEPTION HANDLING IN PYTHON

EXCEPTION HANDLING IN PYTHON

University

22 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Tracy Mayhead

Used 10+ 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?