Created
January 19, 2015 01:39
-
-
Save filipecifali/e52dd3c083ce8b47257e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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