A non-governmental organization needs a program to calculate the amount of financial assistance for needy families....

90.2K

Verified Solution

Question

Programming

  1. A non-governmental organization needs a program to calculatethe amount of financial assistance for needy families. The formulais as follows:5 pts
  • If the annual household income is between $30,000 and $39,999and the household has at least three children, the amount is $1000per child.
  • If the annual household income is between $20,000 and $29,999and the household has at least two children, the amount is $1500per child.
  • If the annual household income is less than $20,000, the amountis $2000 per child.

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

Implement a function for thiscomputation. Write a program that asks for the household income andnumber of children for each applicant, printing the amount returnedby your function. Use a -1 as a sentinel value for the input.

DefcomputeAssistance (income,children)

  1. Your code with comments
  2. 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”)

python keep it simple

Answer & Explanation Solved by verified expert
3.9 Ratings (370 Votes)
Answer Hope your query is resolved function to calculate the amount of financial assistance for needy    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students