
Python Basics Quiz
Authored by Twilla Walton
Computers
5th Grade
DOK Level 2: Skill/Concept covered
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct data type for the value `True` in Python?
String
Integer
Boolean
Float
Tags
DOK Level 2: Skill/Concept
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to define a function in Python?
`def myFunction:`
`function myFunction():`
`def myFunction():`
`myFunction() def:`
Tags
DOK Level 2: Skill/Concept
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the list `fruits = ["apple", "banana", "cherry"]`, how would you access the second item in the list?
`fruits[0]`
`fruits[1]`
`fruits[2]`
`fruits[-1]`
Tags
DOK Level 2: Skill/Concept
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python x = 10 if x > 5: print("Greater") else: print("Smaller") ```
Greater
Smaller
Error
None
Tags
DOK Level 2: Skill/Concept
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to open a file named `data.txt` for reading in Python?
`open("data.txt", "r")`
`open("data.txt", "w")`
`open("data.txt", "a")`
`open("data.txt", "x")`
Tags
DOK Level 2: Skill/Concept
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write a function `add_numbers` that takes two parameters and returns their sum. What is the correct implementation?
```python def add_numbers(a, b): return a + b ```
```python def add_numbers(a, b): print(a + b) ```
```python def add_numbers(a, b): a + b ```
```python def add_numbers(a, b): return a - b ```
Tags
DOK Level 3: Strategic Thinking
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the dictionary `student = {"name": "John", "age": 12, "grade": "7th"}`, how would you access the value associated with the key `"age"`?
`student["name"]`
`student["age"]`
`student["grade"]`
`student["12"]`
Tags
DOK Level 2: Skill/Concept
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
15 questions
Latihan Soal Penugasan 2 - Sweet Home 3D
Quiz
•
5th Grade
15 questions
Excel
Quiz
•
5th - 6th Grade
15 questions
ÔN THI HK2 LOP 3
Quiz
•
2nd - 5th Grade
13 questions
Guess the Retro Computer 1
Quiz
•
KG - Professional Dev...
10 questions
KEIRO PROGRAMMING
Quiz
•
4th - 12th Grade
10 questions
Algorithm & Sequence
Quiz
•
1st - 5th Grade
10 questions
Programming Constructs
Quiz
•
5th - 11th Grade
12 questions
G5 - review image skills + table skills
Quiz
•
5th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade