
B2 Programming Mastery Quiz
Authored by Petar Duraliev
Mathematics
6th Grade

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 statement best describes why functions are used in programming?
To increase the number of variables
To make code longer
To group reusable logic into a named block
To replace loops
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is missing from this function? def check(age): if age >= 18: print("Adult")
A parameter
A return statement
A loop
A variable declaration
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which version correctly returns whether someone is old enough?
def check(age): if age >= 18: print(True)
def check(age): return age >= 18
def check(age): age >= 18
def check(age): return print(age >= 18)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which best describes a count-controlled loop?
A loop that runs while a condition is true
A loop that runs forever
A loop that runs a fixed number of times
A loop that only runs once
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which loop is typically used when the number of repetitions is unknown?
for loop
while loop
if statement
function
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Bubble Sort, what happens after the first full pass?
The smallest element is in the middle
The largest element is at the end
The list is fully sorted
Nothing changes
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why does the inner loop in Bubble Sort use: range(0, n - 1 - i)
To reduce comparisons after each pass
To increase speed randomly
To skip even numbers
To reverse the list
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?