stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
MCL chapter2 - Loops and Factorial Flashcards | StudBud
Explore
/
MCL chapter2 - Loops and Factorial
MCL chapter2 - Loops and Factorial
17 terms
·
StudBud Administration
·
61 plays
Imported from external platform
Flashcards
17 cards
F
Practice quiz
P
Host live
L
Questions
17
Answers
1
Which of these lockers will be open at the end of the 30-locker puzzle?
20
16
25
10
2
What does a 'loop within a loop' describe in programming?
Single action repetition
Conditional statement
Nested iteration
Recursive function
3
Which number has exactly 3 positive divisors?
7
9
6
8
4
How many lockers are open in the 100-locker version?
12
9
10
11
5
In the 30-locker puzzle, what action does Student 3 perform?
Closes locker #3 only
Toggles every 3rd locker
Opens every locker
Skips the lockers
6
What all did you like about the learning session today
The Puzzle
The trainer
The class structure
The Kahoot
7
Which real-world system benefits from loop-based simulations?
Automated traffic light systems
Banking interface
Online shopping
Drawing apps
8
What will this code print?
0 1 2 3
2 3 4
1 2 3
1 2 3 4
9
Why do perfect square lockers stay open?
They are toggled last
They are never toggled
They are toggled an odd number of times
They are toggled twice only
10
What is the value of 4 factorial (4!)?
16
8
24
20
11
What does this code doing loops and divisors print?
All odd numbers up to 12
All even numbers up to 12
All divisors of 12
All multiples of 12
12
What does the following code print?
All perfect square factors of 36
All numbers divisible by 6
All factors of 36
All perfect squares between 1 and 36
13
What programming concept best describes the locker puzzle?
Functions
Variables
Recursion
Loops
14
Why is understanding factors important in computer science?
To write SQL queries
To analyze performance and optimize loops
To design GUIs
To build web apps
15
In smart homes, how can motion sensors mimic the locker puzzle?
By counting rooms
By toggling lights based on entry count
By turning off lights randomly
By fixing light colors
16
What else would you like
We would like a summer camp with sessions like this
Like it - Will bring my friends to this next week
Make the session longer
Teach us some programming concepts
17
What will this code output?
Factorials from 1! up to 6!
Factorials greater than 100
Factorials from 1! up to 5!
All numbers from 1 to 100