Updated Binky Reference

If Statement

If Demo If Demo

Solution code showing if/test/lines

def if_demo(binky):
    'Move forward until blocked, changing any blue squares to red'
    while binky.front_clear():
        if binky.get_color() == 'blue':
            binky.paint('red')
        binky.move()


Def Revisit - Decomposition

1. Blueish - Decomp First Exercise

Blueish

Explain: a b at top, cases

2. Crazy Stanford

Crazy Stanford