Skip to content

Instantly share code, notes, and snippets.

@15nmcgoldrick
Last active January 25, 2018 10:36
Show Gist options
  • Save 15nmcgoldrick/af88b59e348e9bcee311faf2d0cf0835 to your computer and use it in GitHub Desktop.
Save 15nmcgoldrick/af88b59e348e9bcee311faf2d0cf0835 to your computer and use it in GitHub Desktop.
class Pizza: #makes a class called pizza
yum=10 #how yum the pizza is
def addsPineapple(self): #reduces the yum by 10
self.yum.=self.yum-10
def addsMushroom(self): #reduces the yum by 9.5
self.yum.=self.yum-9.5
def noPepperoni(self): #reduces the yum by 5
self.yum.=self.yum-5
def sayYum(self): #show you how yum the pizza is currently
print("this Pizza is a " + str(self.yum))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment