
Python Basics Quiz for Year 9

Quiz
•
Information Technology (IT)
•
8th Grade
•
Hard
J Blakley
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
20 questions
Figurative Language Review

Quiz
•
8th Grade
10 questions
Understanding the Scientific Method

Interactive video
•
5th - 8th Grade
20 questions
Scientific method and variables

Quiz
•
8th Grade
20 questions
Physical and Chemical Changes

Quiz
•
8th Grade