Question
Python Code: #The program will allow the user to enter in the selling prices of homes sold #in a subdivision. It will calculate the average
Python Code:
#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
print("Botany Bay Home Sales") print("*********************************") #Print the Prices array for index in range(7): print('{:d}'':'.format(Index + 1), HomeOwner[Index], '\t', SellingPrice[Index]) #To get your output to match use the tab character (\t) and the format function #with a ,.2f mask
print()
Output should look like this:
Welcome to the Botany Bay home sales calculator This program will calculate the average selling price of the homes sold this past year. It will then determine how many homes sold above the average, how many homes sold below the average, the highest priced home and the lowest priced home. ======================================================================= Botany Bay Home Sales ********************************* 1 : Carson $ 125,900.00 2 : Smith $ 115,000.00 3 : Jackson $ 105,900.00 4 : Swanson $ 85,000.00 5 : Perry $ 150,000.00 6 : Beufort $ 155,249.00 7 : Anderson $ 97,500.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started