Skip to content

Instantly share code, notes, and snippets.

@filipecifali
Created January 19, 2015 01:39
Show Gist options
  • Save filipecifali/e52dd3c083ce8b47257e to your computer and use it in GitHub Desktop.
Save filipecifali/e52dd3c083ce8b47257e to your computer and use it in GitHub Desktop.
class Hotel(object):
def __init__(self, name, ranking, price):
self.name = name
self.ranking = ranking
self.price = price
def show_price(self, date):
if date is Saturday or date is Sunday:
self.price = self.price * 0.2
h1 = Hotel('Hotel 1', 4, 110)
h2 = Hotel('Hotel 2', 3, 100)
h3 = Hotel('Hotel 3', 3, 120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment