
Python Basics Quiz
Quiz
•
Computers
•
9th Grade
•
Practice Problem
•
Easy
Kimberly Stears
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data type would you use to store the value `True` or `False` in Python?
int
float
bool
string
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to define a function in Python?
function myFunction():
def myFunction():
function: myFunction()
define myFunction():
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet? ```python x = 10 if x > 5: print("Hello") else: print("Goodbye") ```
Hello
Goodbye
SyntaxError
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add an element `5` to the end of a list named `myList`?
myList.add(5)
myList.append(5)
myList.insert(5)
myList[5] = 5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following creates a dictionary named `myDict` with a key `name` and its value `John`?
myDict = dict("name": "John")
myDict = {"name": "John"}
myDict = dict(name="John")
myDict = ["name": "John"]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet? ```python print(type(3.14)) ```
int
float
string
bool
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which control structure allows you to execute a block of code multiple times?
If-Else
For loop
Function
Try-Except
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 Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
14 questions
Kiểu dữ liệu xâu kí tự - xử lí xâu kí tự
Quiz
•
9th - 12th Grade
15 questions
Arduino
Quiz
•
7th - 9th Grade
10 questions
STM BTEC DIT 3- 5. Maintenance, set-up, performance p152
Quiz
•
9th - 11th Grade
15 questions
History of Computers
Quiz
•
6th - 12th Grade
20 questions
Python Recap
Quiz
•
7th Grade - University
10 questions
7.2 Knowledge check
Quiz
•
9th Grade
20 questions
CPA Revision MCQ1
Quiz
•
8th - 9th Grade
15 questions
Networking Quiz
Quiz
•
8th - 9th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
