Search Header Logo

Python Exercise

Authored by Manik Kusuma

Computers

8th Grade

Used 7+ times

Python Exercise
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

46 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a correct way to declare a Python variable?

var x = 5

#x = 5


$x = 5


x = 5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False:
You can declare string variables with single or double quotes.

x = "John"
# is the same as
x = 'John'

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False:
Variable names are not case-sensitive.

a = 5
# is the same as
A = 5

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct file extension for Python files?

.pp

.pt

.py

.pn

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a correct syntax to exit the Python command line interface?

exit()

stop()

end()

X

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False:

Indentation in Python is for readability only.

True

False

7.

DRAG AND DROP QUESTION

1 min • 1 pt

Insert the missing part of the code below to output "Hello World".

​ (a)   ("Hello World")

print
x =
def =
list :

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?

Discover more resources for Computers