I'm new to Python and keep getting this error. Can some please help me? Thanks in advance.
def main ():
intro()
get_income()
get_number()
compute_assistance(get_income, get_number)
def intro():
print("\nWelcome to our financial assistance program. ")
print("In order for us to assist you, we'll need some information. ")
print("Your eligibility and amount of assistance will depend on a couple of factors. ")
def get_income():
income = float(input("\nPlease enter annual household income: $"))
while income < 0:
print("Error! Income must exceed zero ")
print("Re-enter Income ", end='')
income = float(input(": "))
return 'income'
def get_number():
number = int(input("Please enter number of children: "))
while number < 0:
print("Error! Cannot have negative children ")
print("Re-enter number of children ", end='')
number = int(input(": "))
return 'number'
def compute_assistance(income, number):
if income in range (30000, 40000) and number >= 3:
total_assistance = float(1000 * number)
print("You qualify for $", format(total_assistance,',.2f'), "in financial assistance! ")
print("You are eligible to receive $1000.00 per child based on your income. ")
elif income in range (20000, 30000) and number >=2:
total_assistance = float(1500 * number)
print("You qualify for $", format(total_assistance,',.2f'), "in financial assistance! ")
print("You are eligible to receive $1500.00 per child based on your income. ")
elif income < 20000:
total_assistance = float(1500 * number)
print("You qualify for $", format(total_assistance,',.2f'), "in financial assistance! ")
print("You are eligible to receive $2000.00 per child based on your income. ")
else:
print("You do not qualify for financial assistance. ")
return 'total_assistance'
main()