
Python Basics Quiz for Year 9
Authored by J Blakley
Information Technology (IT)
8th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name in Python?
2ndNumber
number_2
number-2
number 2
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data type is the value `True` in Python?
String
Integer
Boolean
Float
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python x = 5 print(type(x)) ```
`
`
`
`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to get input from the user in Python?
input()
get()
scan()
read()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of `7 // 2` in Python?
3.5
3
4
3.0
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to define a function in Python?
function myFunc():
def myFunc[]:
def myFunc():
func myFunc():
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print? ```python for i in range(3): print(i) ```
1 2 3
0 1 2
0 1 2 3
1 2
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?