+ 1

Dictionary in class

I need a rough idea how to start with. e.g In a class "Building", I want at output the no. of floors in each building and no. of rooms in each floors. I can add the instances of building. For instance output should be like {Name: Residential Building {floors:2{floor1:5 room, floor2:3 room}}, Name: Plaza {floor:1{floor1:3room}}}. Hope you got the point

13th Feb 2019, 5:31 PM
Haider
2 odpowiedzi
+ 7
Hi I would use one of this solutions https://www.python-course.eu/python3_properties.php question is how data have to be set and get
14th Feb 2019, 10:54 AM
Hubert Dudek
Hubert Dudek - avatar
+ 1
Hubert Dudek can you help me out?
14th Feb 2019, 6:37 AM
Haider