Question: Create a function, called result _ tuples, which takes a location as an argument, this # should be of type str . The function will

Create a function, called result_tuples, which takes a location as an
argument, this
# should be of type str. The function will create namedtuples named real_estate.
Each
# namedtuple should have the fields :
# location, cheapest_buy_price, avg_buy_price and most_exp_buy.
# To create each tuple you will need to make function calls to our previously
defined
# functions in this homework. Also keep in mind that The function must return the
namedtuple created.
# Note1: You will also need to convert the units from sqmt to sqft and euros to
# dollars using the functions from previous homeworks.
# Note2: You will need to place those functions in the extra_functions.py file and
# import them to use them as we've done in the past.
# Note3: You may need to modify our previously used functions so they work with our
# data.
# Output should look like this :
# (the location can change, I used Madrid as an example, numerical values are
correct) :
# real_estate(location='Madrid', cheapest_price=149000.0,
avg_price=557707.7581831556, most_exp=4700000.0)
# (10 points)
from collections import namedtuple

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!