sample.python.txt 282 B

12345678910111213
  1. import banana
  2. class Monkey:
  3. # Bananas the monkey can eat.
  4. capacity = 10
  5. def eat(self, n):
  6. """Make the monkey eat n bananas!"""
  7. self.capacity -= n * banana.size
  8. def feeding_frenzy(self):
  9. self.eat(9.25)
  10. return "Yum yum"