-
-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathhouse.py
More file actions
21 lines (17 loc) · 713 Bytes
/
house.py
File metadata and controls
21 lines (17 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"The Product"
class House(): # pylint: disable=too-few-public-methods
"The Product"
def __init__(self, building_type="Apartment", doors=0,
windows=0, wall_material="Brick"):
# brick, wood, straw, ice
self.wall_material = wall_material
# Apartment, Bungalow, Caravan, Hut, Castle, Duplex,
# HouseBoat, Igloo
self.building_type = building_type
self.doors = doors
self.windows = windows
def construction(self):
"Returns a string describing the construction"
return f"This is a {self.wall_material} "\
f"{self.building_type} with {self.doors} "\
f"door(s) and {self.windows} window(s)."