You are
on
your honor to make a good-faith effort to solve problems on your
own, or with your partners, before using these hints. This typically
means
at least 10 minutes of brainstorming, attacking the problem
with pencil and paper, drawing small diagrams, and so on. The hints are
provided with the intention of reducing frustration when course staff
support is not available.
The hints are written in white text on a white background. On most browsers
you make the hint visible by moving your mouse over it. If that
doesn't work, click your mouse on the screen and drag it over the box: the
text will become visible. Try it out on the apparently-empty box below:
If you can read these words, you are doing it correctly.
Exercise A
Hint:
alyssa = Person("Alyssa")
alyssa.say("Hamsters and rangers everywhere, rejoice!")
Exercise B
Hint 1 (making places and neighbors):
home = Place("Home")
away = Place("Away")
home.add_neighbor("outside", away)
away.add_neighbor("home", home)
If you get errors, make sure the adventure.py module is loaded.
Hint 2 (installing a person):
me = Person("Me")
me.install(home)
me.look()
Hint 3 (installing a thing):
heart = OwnableObject("Heart")
heart.install(home)
me.look()
me.take(heart)
me.go("outside")
me.look()
me.go("home")
me.lose(heart)