Let me know if you have any doubt.
Solution:
numRenters=int(input("How many renters? "))
creditScore=int(input("What is 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? ")
baseRent=int(input("What is the listed rent? "))
if isFelon=='no' and creditScore>579 and monthlyIncome>=3*baseRent:
totalMonthyRent=baseRent
if creditScore>=740:
totalMonthyRent=totalMonthyRent*0.90
if hasPet=='yes':
totalMonthyRent=totalMonthyRent+100
print('Total monthly rent:',totalMonthyRent)
print('Rent per person:',round(totalMonthyRent/numRenters))
DownPayment=totalMonthyRent*2+250
print('Down Payment:',DownPayment)
print('Payment per person:',round(monthlyIncome/numRenters),2)
else:
print('you are ineligible renters.')
Sample Output:
![IPython console 3 Console 1/A In [7]: runfile(C:/users/vipul/ . spyder-py3/temp . py, How many renters? 4 What is your lowest credit score? 742 What is your total monthly income? 1000 wdir-C:/users/vipul/ . spyder-py3) e you a convicted felon? no Do you have a cat or dog? yes What is the listed rent? 200 Total monthly rent: 280.0 Rent per person: 70.0 Down Payment: 810.0 Payment per person: 250.0 In [8]: runfile(C:/Users/Vipul/.spyder-py3/temp.py, wdir-C:/Users/Vipul/.spyder-py3) How many renters? 4 What is your lowest credit score? 230 What is your total monthly income? 1000 e you a convicted felon? yes Do you have a cat or dog? no What is the listed rent? 200 You are ineligible renters. In [9]:](http://img.homeworklib.com/questions/a8f2dce0-aed7-11eb-8877-47343745a124.png?x-oss-process=image/resize,w_560)
Let's use your knowledge of Python functions to simulate how Seattle landlords might evaluate renters. Create...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...