Question: in Python, A non-governmental organization needs a program to calculate the amount of financial assistance for needy families. The formula is as follows:5 pts If

in Python, A non-governmental organization needs a program to calculate the amount of financial assistance for needy families. The formula is as follows:5 pts

If the annual household income is between $30,000 and $39,999 and the household has at least three children, the amount is $1000 per child.

If the annual household income is between $20,000 and $29,999 and the household has at least two children, the amount is $1500 per child.

If the annual household income is less than $20,000, the amount is $2000 per child.

(Note: anything outside these conditions, there is NO financial assistance)

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 a -1 as a sentinel value for the input.

DefcomputeAssistance (income, children)

Your code with comments

A screenshot of the execution

Test Cases:

Household income = $35,000 No. of children = 4 (should return $1000/child)

Household income = $25,000 No. of children = 3 (should return $1500/child)

Household income = $18,000 No. of children = 2 (should return $2000/child)

Household income = $40,000 No. of children = 1 (should return No assistance)

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!