Just Python
Hardware
Comp Sci Theory
Pico's
Fun Things
100

What is z after the following python code?

x = 6

y = x -2

z = x + y

z equals 10

100

What is a pinout? 

A diagram or key for any piece of hardware. It tells you what each pin can be used for. 

100

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.

100

What is a raspberry PI Pico? 

Microcontroller (mini-computer) 

100

ants?

ANTS!

200

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. 

200

What is Hardware?

The physical pieces and components of a computer or electronically based system. 

200

What are the two main types of loops? 

For loop (do for a set number of times)

While loop (do while something is true)

200

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

200

What is the new instructor's name?

Jade

300

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 

300

What signals are linked/connected in a breadboard?

In the middle horizontally on the outsides vertically.   

300

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

300

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. 

300

What is behind the giant screen right now?

2 clothes hangers!

400

What is y set to after the following python code?

list = ["a", "b", "c", "d", "e"]

y = list[3]

y = "d"

400

Which side of an LED should be connected to a positive signal? 

The longer side. 

400

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.  

400

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)

400

What is the newest wood type in Minecraft?

Bamboo

500

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]


500

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)

500

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

500

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)






If the button is pressed the led light will blink 5 times with the following pattern light on for 1 second, light off for 1 second. 
500

What is gravy?

A fruit!

M
e
n
u