Question: Language: Python A non-governmental organization needs a program to calculate the amount of financial assistance for needy families. The formula is as follows: o o

Language: Python A non-governmental organization needs a program to calculate the amountLanguage: Python

A non-governmental organization needs a program to calculate the amount of financial assistance for needy families. The formula is as follows: o o If the annual household income is between $30,000 and $40,000 and the household has at least three children, the amount is $1,000 per child. If the annual household income is between $20,000 and $30,000 and the household has at least two children, the amount is $1,500 per child. If the annual household income is less than $20,000 the amount is $2,000 per child. o Implement a function for this computation. Write a program that asks for the household income and number of children for each applicant, printing the amount returned by your function. Use -1 as a sentinel value for the input. A sample run is shown below. Name your file assistance.py What is the household income (-1 to quit)? 45000 How many children? 3 The assistance amount is $0.00. What is the household income (-1 to quit)? 35000 How many children? 4 The assistance amount is $4000.00. What is the household income (-1 to quit)? Marking criteria Header comment and comments throughout: 0.5 mark Declaring one appropriate constant: 0.5 mark Modularizing your code by creating three functions with appropriate logic and functionality: 9 marks Note: Both problems MUST be solved using functions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!