Python Exercise

Python Exercise

8th Grade

46 Qs

quiz-placeholder

Similar activities

Year 8 CS Python Autumn reports

Year 8 CS Python Autumn reports

8th Grade

50 Qs

CS8 4th SW ZLGA

CS8 4th SW ZLGA

8th Grade

45 Qs

Year 8 Term Exam

Year 8 Term Exam

8th Grade

45 Qs

Yr 9 CS

Yr 9 CS

8th Grade

51 Qs

Python Programming Quiz

Python Programming Quiz

8th Grade

42 Qs

End of Year 8 - ICT Assessment

End of Year 8 - ICT Assessment

8th Grade

50 Qs

Python - lists and variables

Python - lists and variables

7th - 12th Grade

46 Qs

More About Python & AI

More About Python & AI

8th Grade

45 Qs

Python Exercise

Python Exercise

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Manik Kusuma

Used 7+ times

FREE Resource

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 :

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?