Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 7th, 2020 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Building:
  2.     def __init__(self, building_no):        #konstruktor
  3.         self.building_no = building_no
  4.         self.staircases = []
  5.  
  6.     def add_staircase(self, staircase):
  7.         self.staircases.append(staircase)
  8.  
  9.     def print_all_staircases(self):
  10.         for staircase in self.staircases:
  11.             print("Staircase nr: " + staircase.staircase_no)
  12.  
  13.     def building_number(self):
  14.         print('Building number is', self.building_no)
  15.  
  16.  
  17. class Staircase:
  18.     def __init__(self, staircase_no):
  19.         self.staircase_no = staircase_no
  20.  
  21.     def staircase_number(self):
  22.         return self.staircase_no
  23.  
  24. building = Building("P2")
  25. staircase_1 = Staircase("5")
  26.  
  27. print(building.print_all_staircases())
  28.  
  29. building.add_staircase(staircase_1)
  30.  
  31. print(building.print_all_staircases())
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top