Source File: ex18_demo.py

These are excerpts shown as snippets from a main file named ex18_demo.py. They generally only make sense in the context of the exercise text, but they're shown here separated by H2 heading tags for audible readers like NV Access.

Snippet 1

def do_nothing():
    pass

Snippet 2

def do_something():
    print("I did something!")

Snippet 3

def do_something():
    print("I did something!")

# now we can call it by its name
do_something()

Snippet 4

def do_more_things(a, b):
    print("A IS", a, "B IS", b)

do_more_things("hello", 1)

Snippet 5

def do_more_things(a, b):
    a = "hello"
    b = 1
    print("A IS", a, "B IS", b)