What is z after the following python code?
x = 6
y = x -2
z = x + y
z equals 10
What is a pinout?
A diagram or key for any piece of hardware. It tells you what each pin can be used for.
Why do most programs have input and output?
To interact with the user. Input allows the user send the program data and output shows the user the result of the program.
What is a raspberry PI Pico?
Microcontroller (mini-computer)
ants?
ANTS!
What does the following python code do?
name = input("What is your pet's name?")
print(name, "I like that name!")
It takes input from the user and will print the input the user entered followed by I like that name.
What is Hardware?
The physical pieces and components of a computer or electronically based system.
What are the two main types of loops?
For loop (do for a set number of times)
While loop (do while something is true)
If you are lighting up an led with a pin on the pico, should you set the pin to input or output on the code?
Output
What is the new instructor's name?
Jade
If x is 8 what is y after the following python code?
if x > 10 or x == 1:
y = 1
elif not (x > 3 and x < 7 ):
y = 2
else
y = 3
Y = 2
What signals are linked/connected in a breadboard?
In the middle horizontally on the outsides vertically.
What is an infinite loop and why would you use it?
A loop will run forever -> you want the loop to run forever - you want the program to always be checking to something
What does the following circuit python code do?
b1 = digitalio.DigitalInOut(board.GP13)
Sets the pin GP13 on the pico board to be used as a digital signal and assigns it b1 to be used in the code.
What is behind the giant screen right now?
2 clothes hangers!
What is y set to after the following python code?
list = ["a", "b", "c", "d", "e"]
y = list[3]
y = "d"
Which side of an LED should be connected to a positive signal?
The longer side.
Why is python considered a high level programing language?
It "easily" understood by programmers, but it needs to be translated down to Binary in order for computers to understand.
Assume the led is already set to an digital output pin.
What does this code do?
led.value = True
time.sleep(5)
led.value = False
Writes the led pin high (or turns on a light) pauses for 5 seconds then writes the pin low (or turns of the light)
What is the newest wood type in Minecraft?
Bamboo
What does the following python code do?
list = [0,2,4,6,8]
for i in range(0, len(list))
list[i] = list[i] + 2
Loops through each index of the list and at each index of the list it adds 2 to the number that is in that position so each item will be 2 greater.
list will now equal [2,4,6,8,10]
How do transistors translate binary? (Hint: think signals)
The if it is a 1 the transistor is on (the electrical signal is Vcc) if it is a 0 the transistor is off (the electrical signal is 0V or GND)
What is this binary number in decimal?
1011 (Hint binary is a 2 based system)
1011 = 11
2^3 +0 + 2^2 + 2^0
8+0+2+1 = 11
led is an output connected to an led, button is an input (if not push 0)
What does the following code do?
while true:
if button.value ==True:
for i in range (5):
led.value = True
time.sleep(1)
led.value = False
time.sleep(1)
What is gravy?
A fruit!