コード例 #1
0
# Create a new city instance and add your building
# instances to it. Once all buildings are in the city,
# iterate the city's building collection and output the
# information about each building in the city.

# megalopolis = City()

# for building in megalopolis.buildings:
#    print(building)

new_york = City("New York", "Dan Jones", "1885")

Adrians_building = Building("800 Parkway Drive", 25)
Adrians_building.purchase("Adrian Reeds")
Adrians_building.construct()
new_york.add_building(Adrians_building)

Kristens_building = Building("1200 Seaway Pass", 58)
Kristens_building.purchase("Kristen Reeds")
Kristens_building.construct()
new_york.add_building(Kristens_building)

Savannahs_building = Building("P Sherman 42 Wallaby Way Sydney", 45)
Savannahs_building.purchase("Savannah Reeds")
Savannahs_building.construct()
new_york.add_building(Savannahs_building)

Matts_building = Building("23 Westwood Avenue", 25)
Matts_building.purchase("Matt Reeds")
Matts_building.construct()
new_york.add_building(Matts_building)
コード例 #2
0
from building import Building
from city import City

three_o_one = Building("301 Plus Park", 4)
five_hundred = Building("500 Interstate Blvd S", 5)
executive_south = Building("1 Executive South", 10)
curts_house = Building("100 Curt's House", 2)
large_skyscraper = Building("3030 Oprah Rd", 100)

three_o_one.purchase("Dr. Phil")
five_hundred.purchase("Joe Shep")
executive_south.purchase("Drew Pazola")
curts_house.purchase("Curt Cato")
large_skyscraper.purchase("Oprah")

three_o_one.construct()
five_hundred.construct()
executive_south.construct()
curts_house.construct()
large_skyscraper.construct()

megalopolis = City()

megalopolis.add_building(three_o_one)
megalopolis.add_building(five_hundred)
megalopolis.add_building(executive_south)
megalopolis.add_building(curts_house)
megalopolis.add_building(large_skyscraper)

for building in megalopolis.buildings:
    print(building)
コード例 #3
0
ファイル: main.py プロジェクト: sncandiani/Urban-Planner
eight_hundred_eighth.construct()
one_hundred_one.construct()
two_hundred_one.construct()
three_hundred_three.construct()
six_hundred_six.construct()

print(f"{eight_hundred_eighth.address} was purchased by {eight_hundred_eighth.owner} on {eight_hundred_eighth.date_constructed} and has {eight_hundred_eighth.stories} stories")

print(f"{one_hundred_one.address} was purchased by {one_hundred_one.owner} on {one_hundred_one.date_constructed} and has {one_hundred_one.stories}")

print(f"{two_hundred_one.address} was purchased by {two_hundred_one.owner} on {two_hundred_one.date_constructed} and has {two_hundred_one.stories}")

print(f"{three_hundred_three.address} was purchased by {three_hundred_three.owner} on {three_hundred_three.date_constructed} and has {three_hundred_three.stories}")

print(f"{six_hundred_six.address} was purchased by {six_hundred_six.owner} on {six_hundred_six.date_constructed} and has {six_hundred_six.stories}")

# Create a new city instance and add your building instances to it. 
# Once all buildings are in the city, iterate the city's building collection and output the information about each building in the city.

megalopolis = City("Megapolis", "Sofia", "2019")

megalopolis.add_building(eight_hundred_eighth)
megalopolis.add_building(one_hundred_one)
megalopolis.add_building(two_hundred_one)
megalopolis.add_building(three_hundred_three)
megalopolis.add_building(six_hundred_six)

for building in megalopolis.buildings: 
    print(building.address)
コード例 #4
0
ファイル: main.py プロジェクト: TrinityChristiana/py-classes
# **************************** Challenge: Urban Planner II ****************************
"""
Author: Trinity Terry
pyrun: python main.py
"""

from building import Building
from city import City
from random_names import random_name

# Create a new city instance and add your building instances to it. Once all buildings are in the city, iterate the city's building collection and output the information about each building in the city.
megalopolis = City("Megalopolis", "Trinity", "2020")

buildings = [
    Building("333 Commerce Street", 33),
    Building("Strada General Traian Moșoiu 24", 5),
    Building("5 Avenue Anatole France", 276),
    Building("1600 Pennsylvania Ave NW", 6),
    Building("48009 Bilbo", 3)
]

for building in buildings:
    person = random_name()
    building.purchase(person)
    building.construct()
    megalopolis.add_building(building)

megalopolis.print_building_details()
コード例 #5
0
hilton = Building("Hilton", "121 4th Ave S", 18)
sheraton = Building("Sheraton", "623 Union St", 33)
union_station = Building("Union Station", "1001 Broadway", 9)

westin.purchase("Mama Bear")
jw.purchase("Papa Bear")
hilton.purchase("Sister Bear")
sheraton.purchase("Brother Bear")
union_station.purchase("Honey Bear")

westin.construct()
jw.construct()
hilton.construct()
sheraton.construct()
union_station.construct()

megalopolis = City("Megalopolis", "Kitty Baby", 2012)

megalopolis.add_building(westin)
megalopolis.add_building(jw)
megalopolis.add_building(hilton)
megalopolis.add_building(sheraton)
megalopolis.add_building(union_station)

print(f'{megalopolis.mayor} is the mayor of the wonderful city of {megalopolis.name}, which was founded in {megalopolis.year}. The following lavish building are located in {megalopolis.name}:')
print()
print()

for building in megalopolis.buildings:
    print(f'The {building.name} is located at {building.address}. It was designed by {building.designer} and construction began on {building.date_constructed}. It is currently owned by {building.owner} and has {building.stories} stories.')
    print()
コード例 #6
0
ten_hundred_ten.purchase("Magnate M.")
seven_hundred_seven.purchase("James J.")
six_hundred_six.purchase("Chicken Monkey")

# After purchased, construct each one
eight_hundred_eighth.construct()
nine_hundred_nine.construct()
ten_hundred_ten.construct()
seven_hundred_seven.construct()
six_hundred_six.construct()

# Once all building are purchased and constructed, print the address, owner, stories, and date constructed to the terminal for each one.
# Example: 800 8th Street was purchased by Bob Builder on 03/14/2018 and has 12 stories.
print(
    f"{eight_hundred_eighth.address} was purchased by a {eight_hundred_eighth.owner} on {eight_hundred_eighth.date_constructed.date()} and has {eight_hundred_eighth.stories} stories."
)

# Create a new city instance and add your building instances to it. Once all buildings are in the city, iterate the city's building collection and output the information about each building in the city.

megalopolis = City()

megalopolis.add_building(eight_hundred_eighth)
megalopolis.add_building(nine_hundred_nine)
megalopolis.add_building(ten_hundred_ten)
megalopolis.add_building(nine_hundred_nine)

for building in megalopolis.buildings:
    print(
        f"{building.address} was purchased by a {building.owner} on {building.date_constructed.date()} and has {building.stories} stories."
    )
コード例 #7
0
ファイル: main.py プロジェクト: Jeff-Hill/Python-Intro
print(
    f'{eight_hundred_eighth.address} was purchased by {eight_hundred_eighth.owner} on {eight_hundred_eighth.date_constructed} and has {eight_hundred_eighth.stories} stories'
)

home = Building("2339 Devonshire Dr.", 2)
home.purchase("Mickey Mouse")
home.construct()
print(
    f'{home.address} was purchased by {home.owner} on {home.date_constructed} and has {home.stories} stories'
)

school = Building("301 Plus Park Blvd", 5)
school.purchase("Goofy")
school.construct()
print(
    f'{school.address} was purchased by {school.owner} on {school.date_constructed} and has {school.stories} stories'
)

Nashville = City("Nashville", "Jeff")
Nashville.established()
Nashville.add_building(home)
Nashville.add_building(school)
Nashville.add_building(eight_hundred_eighth)
for building in Nashville.buildings:
    print(
        f'Nashville has a {building.stories} story building at {building.address} that was built by {building.owner} on {building.date_constructed}.'
    )

# for building in Nashville.__dict__.items():
#         print({building.Building.owner})
コード例 #8
0
building_two.purchase("Joe Kennerly")
building_two.construct()
building_three = Building("123 3rd st.", 12)
building_three.purchase("Dustin Hobson")
building_three.construct()
building_four = Building("655 4th st.", 8)
building_four.purchase("Scott Silver")
building_four.construct()
building_five = Building("855 5th st.", 9)
building_five.purchase("Adam Knowles")
building_five.construct()

buildings = (building_one, building_two, building_three, building_four,
             building_five)

megaloplis.add_building(building_one)
megaloplis.add_building(building_two)
megaloplis.add_building(building_three)
megaloplis.add_building(building_four)
megaloplis.add_building(building_five)

for building in buildings:
    date = building.date_constructed.strftime('%m/%d/%y')
    print(
        f'{building.address} was purchased by {building.owner} on {date} and has {building.stories} stories'
    )

for building in megaloplis.buildings:
    date = building.date_constructed.strftime('%m/%d/%y')
    print(
        f'{building.address} in the city of {megaloplis.name} was purchased by {building.owner} on {date} and has {building.stories} stories'
コード例 #9
0
from building import Building, building_1, building_2
from city import City

Mega_City = City("MEGA CITY", "Joe Shep", "2012")

Mega_City.add_building(building_1)
Mega_City.add_building(building_2)

for building in Mega_City.buildings:
    print(building)
コード例 #10
0
from building import Building
from city import City

four_oh_four_church = Building("404 Church St.", 14)
three_three_two_marshall = Building("332 Marshall St.", 2)
three_oh_one_plus_park = Building("301 Plus Park Blvd.", 5)
five_spot = Building("1006 Forrest Ave.", 1)
batman_building = Building("333 Commerce St.", 33)

buildingsList = [
    four_oh_four_church, three_oh_one_plus_park, three_three_two_marshall,
    batman_building, five_spot
]

for building in buildingsList:
    building.purchase("Joe Exotic")
    building.construct()
    # print(f'{building.address} was purchased by {building.owner} on {building.date_constructed.tm_mon}/{building.date_constructed.tm_mday}/{building.date_constructed.tm_year} and has {building.stories} stories')

nashville = City("Nashville", "John Cooper")

for building in buildingsList:
    nashville.add_building(building)

nashville.generate_city_report()
コード例 #11
0
from building import Building
from city import City

main = Building("123 Main St", 3)
sky = Building("23 Sky Drive", 5)
jones = Building("2839 Jones Rd", 1)
dogwood = Building("2039 Dogwood Lane", 2)
porter = Building("2938 Porter Rd", 3)

megalopolis = City("Megalopolis")

megalopolis.add_building(main)
megalopolis.add_building(sky)
megalopolis.add_building(jones)
megalopolis.add_building(dogwood)
megalopolis.add_building(porter)

for building in megalopolis.buildings:
    print(building.address)
コード例 #12
0
ファイル: main.py プロジェクト: taylorhcarroll/Python-Classes
import datetime
import building
from city import City

townsville = City("Townsville", "Mayor Mayorson", datetime.datetime.now())
townsville.add_building(building.my_Home)
townsville.add_building(building.shakeys)
townsville.add_building(building.test_building)

for building in townsville.buildings:
    print(
        f"In the city of {townsville.name} {building.address} was purchased by a {building.owner} on {building.date_constructed} and has {building.stories} stories."
    )
コード例 #13
0
buildings = [
    hospital_building, school_building, grocery_building, church_building,
    bar_building
]


def mogul():
    for building in buildings:
        building.purchase("Daisy Gatsby")
        # print(building.owner)


mogul()


def construct():
    for building in buildings:
        building.construct()
        # print(f'{building.address} was purchased by {building.owner} on {building.date_constructed} and has {building.stories} stories.')


construct()

boston = City("Boston", "Sarah Collins", 1689)
for building in buildings:
    boston.add_building(building)
for building in boston.buildings:
    print(
        f"This building in Boston is owned by {building.owner}, is located at {building.address} and is {building.stories} stories tall"
    )
コード例 #14
0
# for each in tech_company.employees:
#     print(f"{each.name} is employeed by {tech_company.name}")

# for each in food_company.employees:
#     print(f"{each.name} is employeed by {food_company.name}")

my_house = Building("1706 Mill St", 2)
my_house.construct()
my_house.purchase("me")
# my_house.solution_sentence()

new_city = City()
new_city.name = "Camden"
new_city.mayor = "Some One"
new_city.year = 2019
new_city.add_building(my_house)
for each in new_city.buildings:
    # print(each)
    print("")


class Student:
    def __init__(self):
        self.first_name = ""
        self.last_name = ""
        self.age = 0
        self.cohort = 0
        self.__full_name = ""

    @property
    def first_name(self):
コード例 #15
0
megalopolis = City("Megalopolis", "Jimmy", 2020)

one = Building("11 1st Street", 11)
two = Building("22 2nd Street", 12)
three = Building("33 3rd Street", 13)
four = Building("44 4th Street", 14)
five = Building("55 5th Street", 17)

one.purchase("Daniel")
two.purchase("Morgan")
three.purchase("Lisa")
four.purchase("Lauren")
five.purchase("Donald")

one.construct()
two.construct()
three.construct()
four.construct()
five.construct()

megalopolis.add_building(one)
megalopolis.add_building(two)
megalopolis.add_building(three)
megalopolis.add_building(four)
megalopolis.add_building(five)

for building in megalopolis.buildings:
    print(
        f"{building.address} was purchased by {building.owner} on {building.date_constructed} and has {building.stories} stories."
    )
コード例 #16
0
ファイル: main.py プロジェクト: jamesnitz/python_classes
from building import Building
from city import City

jtown = City('James Town', 'McCheese', '2020')

my_apt = Building('the shay', "9 City Place", 4, 'ya boi')
my_dads_house = Building('My Dads house', "Over there", 2, 'dat dude')

jtown.add_building(my_apt)
jtown.add_building(my_dads_house)

print(f"{jtown.name} established in {jtown.year_established} is made up of:")
for building in jtown.buildings:
    print(' ')
    print(building.building_name)
    print('-------------')
    print(
        f'{building.building_name} is owned by {building.owner} and has {building.stories} levels!'
    )
コード例 #17
0
ファイル: main.py プロジェクト: treysuiter/py-planner
my_house_bldg.purchase("Biance")
tAndC_ford_bldg.purchase("Sam Silly")
madison_commCenter_bldg.purchase("Alan Arf")
nash_soft_school_bldg.purchase("Some Dude")

all_Bldgs = [
    nash_soft_school_bldg, batman_bldg, my_house_bldg, tAndC_ford_bldg,
    madison_commCenter_bldg
]

# 800 8th Street was purchased by Bob Builder on 03/14/2018 and has 12 stories.

# for bldg in all_Bldgs:

#     date_array = str(bldg.date_constructed).split(" ")
#     date = date_array[0]
#     split_date = date.split("-")
#     final_date = f"{split_date[1]}/{split_date[2]}/{split_date[0]}"
#     print(f"{bldg.address} was purchased by {bldg.owner} on {final_date} and has {bldg.stories} stories.")
#     print()

megalopolis = City()
megalopolis.name = "Big Ole City"
megalopolis.mayor = "Fancy Pants McMayor Face"
megalopolis.yearEstablished = "2001"

for building_to_add_to_city in all_Bldgs:
    megalopolis.add_building(building_to_add_to_city)

megalopolis.printBuildings()
コード例 #18
0
# batman_building.print_description()

renaissance_hotel = Building("400 Carothers Blvd", 9)
renaissance_hotel.purchase("Big Brothers Group")
renaissance_hotel.construct()
# renaissance_hotel.print_description()

capital_building = Building("12 Capital Blvd", 4)
capital_building.purchase("Git-Er-Done Real Estate Group")
capital_building.construct()
# capital_building.print_description()

regions_bank = Building("8088 Regions Blvd", 3)
regions_bank.purchase("Financial Real Estate Group")
regions_bank.construct()
# regions_bank.print_description()

empire_state = Building("20 W 34th St, New York, NY 10001", 102)
empire_state.purchase("Capital Investments")
empire_state.construct()
# empire_state.print_description()

# Adding the buildings to our new city
megtropolis.add_building(batman_building, renaissance_hotel, capital_building,
                         regions_bank, empire_state)

for building in megtropolis.buildings:
    # So I can print the individual properties of each building obj,
    # but I can't print a list of its key/value pairs...
    print(f"Address: {building.address}, Stories: {building.stories}")
コード例 #19
0
from building import Building
from city import City

five_hundred_fifty_five_fifth = Building("Five's", "555 5th St", 34)
four_twentieth = Building("Mary Jane's", "4 20th St", 21)
twelfth_and_jefferson = Building("Montichello", "12th and Jefferson", 100)
six_bleeker = Building("The New York Sanctum", "6 Bleeker St", 3)
stark_tower = Building("Stark Tower", "600 Broadway", 150)

stark_tower.purchase("Tony Stark")
six_bleeker.purchase("Dr. Strange")
twelfth_and_jefferson.purchase("Thomas")
five_hundred_fifty_five_fifth.purchase("Jeff Bezos")
four_twentieth.purchase("Cheech and Chong")

stark_tower.construct()
four_twentieth.construct()
six_bleeker.construct()
five_hundred_fifty_five_fifth.construct()
twelfth_and_jefferson.construct()

gothom = City("Gothom City", "Alfred")

gothom.add_building(stark_tower)
gothom.add_building(six_bleeker)
gothom.add_building(five_hundred_fifty_five_fifth)
gothom.add_building(four_twentieth)
gothom.add_building(twelfth_and_jefferson)

for building in gothom.buildings:
    print(f"\n{building.name} is on {building.address}. It has {building.stories} stories and is owned by {building.owner}. It was built on {building.date_constructed.strftime('%x')} by {building.designer}.")
コード例 #20
0
building_three = Building("300 3rd Street", 9)
building_three.construct()
building_three.purchase("Henry House Hunters")
building_three.print_details()

building_four = Building("400 4th Street", 19)
building_four.construct()
building_four.purchase("Rafael's Real Estate")
building_four.print_details()

building_five = Building("500 5th Stree", 11)
building_five.construct()
building_five.purchase("Brittany's Buying Business")
building_five.print_details()

nashville = City("Nashville", "John Cooper", 1806)

nashville.add_building(building_one.address)
nashville.add_building(building_two.address)
nashville.add_building(building_three.address)
nashville.add_building(building_four.address)
nashville.add_building(building_five.address)

print(
    f"{nashville.name} was established in {nashville.established_year}. {nashville.mayor} is the current mayor. {nashville.name} contains the following buildings:"
)

for building in nashville.buildings:
    print(building)
コード例 #21
0
ファイル: main.py プロジェクト: melliemuse/urban-planner2
building_1 = Building("1500 S Wacker", 25)
building_2 = Building("Elysian Fields", 47)
building_3 = Building("Versailles", 20)
building_4 = Building("Brokedown Palace", 2)
building_5 = Building("shack", 1)
# Have each one get purchased by a real estate magnate
# After purchased, construct each one
# print(building_1.name)

building_1.purchase("some rich guy")
building_1.construct()
building_2.purchase("Rich Uncle Pennybags")
building_2.construct()
building_3.purchase("Warren Buffet") 
building_3.construct()
building_4.purchase("Patti Lapone")
building_4.construct()
building_5.purchase("Patti LaBelle")
building_5.construct()

# Create a new city instance and add your building instances to it. Once all buildings are in the city, iterate the city's building collection and output the information about each building in the city.
# Awesome code here
gotham.add_building(building_1)
gotham.add_building(building_2)
gotham.add_building(building_3)
gotham.add_building(building_4)
gotham.add_building(building_5)
# print(gotham)
 
gotham.list_buildings()  
コード例 #22
0
building_three = Building("3rd st", 5)
building_four = Building("4th ave", 23)
building_five = Building("5th blvd", 11)

building_five.purchase("Fred")
building_four.purchase("Fredward")
building_three.purchase("Freddifer")
building_two.purchase("Freddy")
eight_hundred_eighth.purchase("Fredegar")

building_five.construct()
eight_hundred_eighth.construct()
building_four.construct()
building_three.construct()
building_two.construct()

building_five.building_print()
building_four.building_print()
eight_hundred_eighth.building_print()
building_three.building_print()
building_two.building_print()

megalopolis = City()
megalopolis.add_building(building_five)
megalopolis.add_building(eight_hundred_eighth)
megalopolis.add_building(building_four)
megalopolis.add_building(building_three)
megalopolis.add_building(building_two)

for building in megalopolis.buildings:
    building.building_print()
コード例 #23
0
eight_hundred_eighth = Building("800 8th Street", 12)
eight_hundred_eighth.purchase("Fred Flintstone")
eight_hundred_eighth.construct()
# print(eight_hundred_eighth)

three_hundred = Building("300 Plus Park Blvd", 6)
three_hundred.purchase("Barney Rubble")
three_hundred.construct()
# print(three_hundred)

five_hundred = Building("500 Interstate Blvd", 3)
five_hundred.purchase("Wilma Flintstone")
five_hundred.construct()
# print(five_hundred)

two_hundred = Building("200 28th Street", 20)
two_hundred.purchase("Betty Rubble")
two_hundred.construct()
# print(two_hundred)

megalopolis = City()
megalopolis.add_building(eight_hundred_eighth)
megalopolis.add_building(three_hundred)
megalopolis.add_building(five_hundred)
megalopolis.add_building(two_hundred)

for building in megalopolis.buildings:
    print(building)

コード例 #24
0
from building import Building
from city import City

megalopolis = City()

# Awesome code here
Saloon = Building("10 Plus Park Blvd", 5)
Stable = Building("28 Plus Park Blvd", 2)

megalopolis.add_building(Saloon)
megalopolis.add_building(Stable)

for building in megalopolis.buildings:
    print(building.__dict__)
コード例 #25
0
ファイル: main.py プロジェクト: dkrusch/python
from building import Building, big_building
from city import City

# Name of the city.
# The mayor of the city.
# Year the city was established.
# A collection of all of the buildings in the city.
# A method to add a building to the city.

megalopolis = City()

# Awesome code here

for building in megalopolis.buildings:
    print(building)

megalopolis.name = "Big Town"
megalopolis.city = ["Wuts up"]
megalopolis.mayor = "Bob Jones"
megalopolis.year = "1815"

small_building = Building("700 7th Street", 13)
small_building.construct()
small_building.purchase("Cob")

megalopolis.add_building(small_building)
megalopolis.add_building(big_building)
megalopolis.destroy_city()
for building in megalopolis.buildings:
    print(building.address)
コード例 #26
0
ファイル: main.py プロジェクト: RyanCrowleyCode/classes
b2.purchase("Fred Frederickson")
b3.purchase("Natalie Nettles")
b4.purchase("George Washington III")
b5.purchase("Abe Laboriel JR")

# After purchased, construct each one
b1.construct()
b2.construct()
b3.construct()
b4.construct()
b5.construct()

# Create a new city instance and add your building instances to it. Once all buildings are in the city, iterate the city's building collection and output the information about each building in the city.

gotham = City("Gotham")

bldgs = [b1, b2, b3, b4, b5]

for bldg in bldgs:
    gotham.add_building(bldg)

for building in gotham.buildings:
    if building.stories == 1:
        print(
            f'{building.address} was purchased by {building.owner} on {building.date_constructed} and has {building.stories} story.'
        )
    else:
        print(
            f'{building.address} was purchased by {building.owner} on {building.date_constructed} and has {building.stories} stories.'
        )
    print()
コード例 #27
0
eight_hundred_eighth = Building("800 8th Street", 12)
seven_hundred_seventh = Building("700 7th Street", 44)
six_hundred_sixth = Building("600 6th Street", 13)
five_hundred_fifth = Building("500 5th Street", 99)
four_hundred_forth = Building("400 4th Street", 88)

eight_hundred_eighth.purchase("Kid Frost")
seven_hundred_seventh.purchase("MC Eight")
six_hundred_sixth.purchase("Dr. Dre")
five_hundred_fifth.purchase("B. Real")
four_hundred_forth.purchase("Mr. Cartoon")

eight_hundred_eighth.construct()
seven_hundred_seventh.construct()
six_hundred_sixth.construct()
five_hundred_fifth.construct()
four_hundred_forth.construct()

megalopolis = City()

megalopolis.add_building(eight_hundred_eighth)
megalopolis.add_building(seven_hundred_seventh)
megalopolis.add_building(six_hundred_sixth)
megalopolis.add_building(five_hundred_fifth)
megalopolis.add_building(four_hundred_forth)

for building in megalopolis.buildings:
    print(
        f"------------------- \n{building.address.upper()}:\n  Owner: {building.owner} \
         \n  Stories: {building.stories}\n  Built: {building.date_constructed} \
         \n  Builder: {building.designer} ")
コード例 #28
0
White_House.purchase('Kurt Realities')
White_House.construct(date="July 4th 1776")

home = Building("910 Shelby Ave", 2, "Home")
home.designer = "Sir Patrick Stewart"
home.purchase("Renu Management")
home.construct()

# city = [batman_building, walgreens, building_3, White_House, home]
# print("___________________")
# for building in city:
#     print(f"The {building.name} is owned by {building.owner} and was built {building.date_constructed} and designed by {building.designer}. You can find it at {building.address}.")
#     print("___________________")

nashville = City("Nashville", "Kurt Krafft", 1993)
nashville.add_building(batman_building)
nashville.add_building(walgreens)
nashville.add_building(building_3)
nashville.add_building(White_House)
nashville.add_building(home)


def declare_city(city):
    print(f"Here are all the buildings in {city.name}")
    for building in city.buildings:
        print(
            f"the {building.name} is in {city.name} and located at {building.address}"
        )


declare_city(nashville)