CSE Day 2 - Variables & While

Wednesday, Sept. 25th

We can store a value (number, text, etc) in a container called a variable

We also learned that we can use a variable to repeat code a certain number of times using the while loop.

Turn on a single line of white lights:

import unicornhathd as u

x = 0


while x < 16:
    u.set_pixel(x, 0, 255, 255, 255)
    x = x + 1

u.show()