Been teaching code (see other thread) and came up with an idea. If I make the code rather silly, they might learn better. First stab at "Humorous Programming":
Example of class "Aggregation" in Python:
Contributions in other languages welcome
Example of class "Aggregation" in Python:
Code:
class Bang:
def __init__(self):
print "Boom!"
class Wheel:
fell_off = True
class Car:
wheels = [Wheel(), Wheel(), Wheel(), Wheel()]
rusty = True
chitty_chitty = [Bang(), Bang()]
Contributions in other languages welcome
