This type of loop repeats the blocks inside it forever, or until you hit the red stop button on the LEGO hub.
Forever (or Repeat Forever) loop?
What is this loop doing and explain the conditions of the given code.
The loop is repeating the sound. It repeats the sound until it both levers are down.
Conditionals are often called "If-Then" statements because they only run code if a certain entry requirement, called a ________, is true.
Condition
What happens when left lever is down and right lever up?
Nothing(error)
Artificial Intelligence
This loop will keep repeating your code until a specific condition becomes true—like a touch sensor being pressed.
Repeat Until Loop
Which of these following examples does the code fit best and why?
Drop from the top
This specific block allows your LEGO robot to do one thing if a sensor is pressed, OR a completely different thing if it is not pressed.
If-Then/Else block
When _______ and _________ then,__________.
When detecting red and both levers are released then it plays a connecting sound.
Explain one environmental issue that AI affects.
Energy usage, Too much fresh water usage etc...
This type of loop includes at least one other loop inside.
Nested Loop
When does this program stop moving?
It never stops (Forever Block)
If you want a conditional to check if a sensor is detecting green AND a button is pressed at the same time, you use this type of operator block.
"And" block
What does the robot do if it sees Red?
Move 20 steps forward
Explain one societal issue that AI causes.
Job displacement, academic dishonesty etc.
True or False: Putting code inside a loop makes your LEGO robot execute the actions faster.
False, (Loops repeat actions, they don’t speed them up.)
Looking at this given code, how many times does the highlighted portion of the code repeat? How many times does the code indicated by the arrow repeat?
24, and 6
A diagram that can show the steps in a program.
Flowchart
With these given conditions, we want to make a robot move straight forward ahead to reach a destination. However, the robot does not move forward when we attempt to. What’s wrong with this code?
The code cannot operate different outputs from just 1 conditional "true" statement.(The first and last code can not run at the same time)
List three misuses of AI.
Plagiarism, fake AI images, Impersonation/manipulation, fraud etc...
Which one utilizes a repeat until loop and how.(Plane, Drop Tower, Alarm Clock)
Alarm Clock
There is a plane doing dropoffs at 3 different times (1 minute apart) using the same exact route. Which program best executes this goal?
A
An instruction that directs what should happen and when it should happen.
Control Structure
We need to design a program for a personal ATM that allows it to deposit money. However for it to function, the right lever must first be lifted up to start up the ATM. The ATM also only accepts cash, so no coins. When the ATM dispenser senses cash, it will play a successful transaction sound. If any other form of currency is sensed, it will play an unsuccessful transaction sound. Which code fulfills these requirements the most? Explain.
Green
If you train an AI to sort LEGO bricks but only show it red bricks during training, it will probably fail to recognize a blue brick. This mistake caused by unfair training data is called ________.
What is Bias?