This code block in scratch/makecode allows you to check a condition, then do an action based on whether the condition is true or not.
What is an if statement?
There are this many bits in a byte.
What is 8?
This was the size of mechanical computers when they were first developped.
What is the size if a gymnasium
?
This is what name for finding or undoing a symbolic cypher.
What is decrypting?
x = false
if x == true:
print("yay")
else:
print("aw")
This is what prints.
What is "aw"?
"5 + 5 = 11"
The equation above would return this boolean (1 or 0) expression.
This question is not open to being answered by other groups.
What is false/0?
This is the most commonly used password in the entire world.
'123456'. Second and third place are 'password' and '12345'. None of these passwords are recommended!
This is another word for while, if, and/or for statements.
What is a conditional statement?
"x = 0
for i in range(6):
x= x+1
This will be the value of x after this code runs.
What is 6?
In a list: [vanilla, chocolate, strawberry], the boolean operator statement is "is not strawberry".
These are the ice cream flavours that would be returned.
What are vanilla and chocolate?
These are the three numbers that uppercase letters start with in binary.
What are 010?
This is what we add to the sharp edges of 3D models to make them softer, like making a diagonal cut on the edge.
What are bevels?
"when program starts
if colour sensor C is colour red
motor A run ↷ for 3 rotations
elseif colour sensor C is colour blue
motor B run ↷ for 3 rotations
else
motor A run ↶ for 5 rotations"
This will happen when the program starts, the Lego Bot is plugged in with motors A and B and colour sensor C, and the colour sensor detects the colour black.
What is motor A running ↶ (left) for 5 rotations?
In a list: [apple, banana, tomato], the boolean operator statement "contains a and contains o".
This is the list item that would output.
What is tomato?
This is what UI stands for.
What is User Interface?
This is the minimum number of moves it takes to move 4 rings on the Towers of Hanoi from one end to the other (with the classic Towers of Hanoi rules).
What is 15 moves?
if button == "up"
setVelocity(0, 0 SPEED)
These are the two errors that would come up.
What is, 1. no "then" in the if statement, and 2. the second comma is absent in the setVelocity()?
This is the answer to: [ (true ∧ false) ∨ (true ∧ true) ]
What is true?
This is what CPU stands for.
What is Central Processing Unit?
This is the name of the process computers use to 'think' through a task that runs between the CPU and the RAM.
What is the fetch-decode-execute cycle?