Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

animals

class Animal:
  def showPleasure(self):
    pass

  def breathe(self):
    print "in out in out"

class Alligator(Animal):
  def bite(self):
    print "chomp chomp"

class Dog(Animal):
  def showPleasure(self):
    print "wag wag"
    print "lick lick"

class Cat(Animal):
  def showPleasure(self):
    print "miaow"
    print "rub rub"

class Reptile:
  def describe(self):
    print "I am a reptile"

class Dinosaur(Reptile):
  def describe(self):
    print "I am extinct"

class Python(Reptile):
  def makeNoise(self):
    print "hiss"



Link to this Page