QuestionQuestion

Let's use your knowledge of Python functions to simulate how Seattle landlords might evaluate rental applications for two apartment scenarios - a one bedroom apartment (rent=$900/mo) & a two bedroom apartment (rent=$1700/mo).

Create a Python program that prompts the user for information a typical rental application might ask:
credit score
number of renters
total monthly income
felon (yes or no)
pet (yes or no)

Then use the supplied information and Python functions to determine the following for each type of apartment:
total monthly rent, according to these rules:
apply a 10% discount on base rent if credit score is at least 740
if renter has a pet, add $100 to total monthly rent
whether the applicant is eligible, according to these rules:
is not a felon
credit score is at least 580
has monthly income at least 3x total monthly rent
down-payment based on these rules:
first: last month's rent
$250 refundable damage deposit

Your program should print an appropriate message for ineligible renters. NOTE - renters might be eligible for one apartment type & in-eligible for another.
Print the following information for each apartment scenario where applicants are eligible:
total monthly rent
rent per person
total down-payment
down-payment per person
You can use this code to prompt users for input: numRenters = int(input("How many renters?"))
creditScore = int(input("What is the your lowest credit score?"))
monthlyIncome = int(input("What is your total monthly income?"))
isFelon = input("Are you a convicted felon?")
hasPet = input("Do you have a cat or dog?")
Hints: Your functions should not use global variables
Functions must be defined before any code that invokes them
Functions should be single-purpose. Avoid code not directly related to the function's purpose
You will need to calculate total monthly rent before determining eligibility

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

def main():
    # prompt users for input
    numRenters = int(input("How many renters?"))
    creditScore = int(input("What is the your lowest credit score?"))
    monthlyIncome = int(input("What is your total monthly income?"))
    isFelon = input("Are you a convicted felon?")
    hasPet = input("Do you have a cat or dog?")
   
    # convert isFelon and hasPet string to lowercase
    isFelon = isFelon.lower()
    hasPet = hasPet.lower()
   
    # two apartment scenarios
    apartments = ["A one bedroom apartment", "A two bedroom apartment"]
    rents = [900, 1700]...
$15.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats