Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

From the bold print on down, I need help with. Python Code: 1 - Create a function called DetermineAverage(), that will determine the average priced

From the bold print on down, I need help with.

Python Code:

1 - Create a function called DetermineAverage(), that will determine the average priced home. This needs to be a value returning function in that when it is called it sends the average back. As with the first part of the lab, you need to code your for loops to allow for the number of items in your prices list to change. This function also needs to print out the average. Don't forget that this function needs the prices list.

Additionally create a function that will determine the number of homes sold above the average and the number of homes sold below the average. As with the first part of the lab, you need to code your for loops to allow for the number of items in your prices lits to change. Make sure this function prints out the number of homes sold above the average and the number of homes sold below the average. Additionally make sure it takes in the prices list and the average.

2 - Create a function DetermineHighest(), that will determine the highest priced home and the name of the home owner. Make this function a value returning function and return both the name of the homeowner and the highest priced home back to where it was called. Make sure your function prints out both the name of the home owner and the highest price. As with the other two sections of this lab, code your for loop to accommodate different sized lists.

3 - Create a function DetermineLowest(), that will determine the lowest priced home and the name of the home owner. Make this function a value returning function and return both the name of the homeowner and the lowest priced home back to where it was called. Make sure your function prints out both the name of the home owner and the lowest price. As with the other two sections of this lab, code your for loop to accommodate different sized lists.

#The program will allow the user to enter in the selling prices of homes sold #in a subdivision. It will calculate the average selling price and then #determine how many homes were sold above the average and how many homes were #sold below the average. def PrintMessage(): #Welcome Message print("Welcome to the Botany Bay home sales calculator") print("This program will calculate the average selling price of the homes") print("sold this past year. It will then determine how many homes sold above") print("the average, how many homes sold below the average, the highest priced") print("home and the lowest priced home.") print("=======================================================================") print() def PrintLists(Prices, HomeOwners): #declare local variables Prices = ['125900', '115000', '105900', '85000', '150000', '155249', '97500'] HomeOwners = ['Carson','Smith','Jackson','Swanson','Perry','Beufort', 'Anderson']

print("Botany Bay Home Sales") print("*********************************")

print()

def DetermineAverage#finish this #Print average print("The average selling price is: $", format(#your variable, ',.2f')) print() return def AboveBelowAvg#finish this

#print the number of homes sold above and below the average print("The number of homes selling above average are: ", numabove) print("The number of homes selling below average are: ", numbelow) print()

def DetermineHighest#Complete this

#Determine Highest priced home and home owner for #complete this

#print out highest value and the owner of that house print("The highest selling house was: $", format(highvalue, ',.2f'), "\tOwned by: ", highowner) print()

return

def DetermineLowest#complete this

for #complete this

#print out lowest value and the owner of that house print("The lowest selling house was: $", format(#your variable, ',.2f'), "\tOwned by: ", #your variable) print() return

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions