Coding and Output
Boolean Logic
Fun Facts
Camp Activities
100

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?

100

There are this many bits in a byte.

What is 8?

100

This was the size of mechanical computers when they were first developped.

What is the size if a gymnasium

?

100

This is what name for finding or undoing a symbolic cypher.

What is decrypting?

200

x = false

if x == true:

    print("yay")

else:

    print("aw")

This is what prints.

What is "aw"?

200

"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?

200

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!

200

This is another word for while, if, and/or for statements.

What is a conditional statement?

300

"x = 0     

for i in range(6):

     x= x+1

This will be the value of x after this code runs.

What is 6?

300

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?

300

These are the three numbers that uppercase letters start with in binary.

What are 010?

300

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?

400

"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?

400

In a list: [apple, banana, tomato], the boolean operator statement "contains and contains o".

This is the list item that would output.

What is tomato?

400

This is what UI stands for.

What is User Interface?

400

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?

500

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()?

500

This is the answer to: [ (true ∧ false) ∨ (true ∧ true) ]

What is true?

500

This is what CPU stands for.

What is Central Processing Unit?

500

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?