我已经连续学习了30个小时,可能应该休息了,但是我想完成这一点。我做错了什么?
def __init__(self, street_address, city, state, zipcode, bedrooms, bathrooms, squarefeet, modelname, salestatus):
self.street_address = street_address
self.city = city
self.state = state
self.zipcode = zipcode
self.bedrooms = bedrooms
self.bathrooms = bathrooms
self.squarefeet = squarefeet + 'square feet'
self.modelname = modelname
self.salestatus = salestatus
def add_home(self):
street_address = input('Enter street address: ')
city = input('Enter city: ')
state = input('Enter state: ')
zipcode = int(input('Enter zip code: '))
bedrooms = int(input('Enter number of bedrooms: '))
bathrooms = int(input('Enter number of baths: '))
squarefeet = int(input('Enter square footage: '))
modelname = input('What is the model?: ')
salestatus = input('Is the home sold, available, or under contract?: ')
home_info = Home_Inventory(street_address, city, state, int(zipcode), int(bedrooms), int(bathrooms), int(squarefeet) + ' square feet', modelname, salestatus)
full_address = (street_address, city, state, int(zipcode)
home_stats = (int(bedrooms), int(bathrooms), int(squarefeet) + ' square feet', modelname, salestatus)
Allhomes = {full_address: home_stats}
print('Home has been added successfully.')