
Mastering Python: Data Types & Functions
Quiz
•
English
•
Professional Development
•
Hard

Kidi Tran
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the data type of the variable `x` in the following Python code snippet? ```python x = 3.14 ```
int
float
str
bool
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid way to define a function in Python?
`def my_function:`
`function my_function()`
`def my_function():`
`my_function() = function`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python x = "Hello" y = "World" z = x + " " + y print(z) ```
`HelloWorld`
`Hello World`
`Hello, World`
`World Hello`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a built-in data type in Python?
list
tuple
array
dict
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? ```python def add(a, b): return a + b result = add(3, 4) print(result) ```
7
34
`add(3, 4)`
None
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is used to import a module in Python?
`import module_name`
`include module_name`
`require module_name`
`using module_name`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following expression in Python? ```python 5 // 2 ```
2.5
2
3
2.0
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Jersey Shore
Quiz
•
6th Grade - Professio...
10 questions
Quiz on Random Access Memory (RAM)
Quiz
•
Professional Development
10 questions
Movies and Cartoons
Quiz
•
7th Grade - Professio...
9 questions
Music trivia
Quiz
•
Professional Development
10 questions
Review on First week
Quiz
•
Professional Development
13 questions
Means of transportation
Quiz
•
Professional Development
13 questions
PRIMARY 3_UNIT 3
Quiz
•
Professional Development
14 questions
L3 ARW
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade