Question

In: Computer Science

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

In PYTHON

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

•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. 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.

Solutions

Expert Solution

If you need any corrections/clarifications kindly comment.

Program


income=None
sum=0
print("Financial Assistance Calculator\n")
income=(float(input("Please enter your house hold income: ")))
while income!=-1:
    sum=0
    num_child=(int(input("Please enter your total number of children: ")))
    if income<20000:
        sum=num_child*2000
    elif income<30000 and income>20000:
        if num_child>=2:
            sum=num_child*1500
    elif income<40000 and income>30000:
        if num_child>=3:
            sum=num_child*1000
    print("You qualify for : ${:0.2f}".format(sum)," in aid.")
    income=(float(input("\nPlease enter your house hold income: ")))
print("Thank you for using Financial Assistance Calculator!")
   
       

  

Output

Financial Assistance Calculator

Please enter your house hold income: 30500
Please enter your total number of children: 4
You qualify for : $4000.00 in aid.

Please enter your house hold income: 15000
Please enter your total number of children: 3
You qualify for : $6000.00 in aid.

Please enter your house hold income: -1
Thank you for using Financial Assistance Calculator!

Screenshot


Related Solutions

Python code Financial Assistance : A non-governmental organization needs a program to calculate the amount of...
Python code Financial Assistance : A non-governmental organization needs a program to calculate the amount of financial assistance for needy families. The formula is as follows: • 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...
A non-governmental organization needs a program to calculate the amount of financial assistance for needy families....
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...
Why is it difficult to define the term NGO? (Non Governmental Organization)
Why is it difficult to define the term NGO? (Non Governmental Organization)
Write a program in python to calculate the amount each person must pay toward the bill...
Write a program in python to calculate the amount each person must pay toward the bill and toward the tip, for a group of friends who are eating out together. Since you are all friends, it is okay to split the costs evenly. Your program should take as input: The restaurant bill (without tax or tip) as a floating point number The sales tax rate as a floating point number (for example: an 8% tax rate would be 0.08) The...
prepare a 500 to 700 word letter to either a government institution or non governmental organization...
prepare a 500 to 700 word letter to either a government institution or non governmental organization of your choice describing the conditions you encountered on a recent visit to an underdeveloped country. In your letter request financial assistance and / or resources for an intervention in a selected area that you feel will have the most impact on population health
Write a Python program that reads in an amount in cents and prints the dollar amount...
Write a Python program that reads in an amount in cents and prints the dollar amount in that and the remaining value in cents. For example, if the amount reads in is 360 (cents), the program would print 3 dollars and 60 cents. if the amount read in is 75 (cents), the program would print 0 dollars and 75 cents.
Write a function that implements the following formula to calculates the amount of financial assistance for...
Write a function that implements the following formula to calculates the amount of financial assistance for families in need: • If the annual family income is between $30,000 and $40,000 and the family has at least 3 children, the assistance amount will be $1,000 per child. • If the annual family income is between $20,000 and $30,000 and the family has at least 2 children, the assistance amount will be $1,500 per child. • If the annual family income is...
Question A non-governmental organization intends to carry out a programme which will involve distribution of clean...
Question A non-governmental organization intends to carry out a programme which will involve distribution of clean water, soap, sanitizers, face mask and food to across all informal settlements in Nairobi County during this coronavirus pandemic period. In view of this, conduct and a comprehensive stakeholder analysis (identifying only FIVE key stakeholders) the NGO will need to engage before commencing the programme.
A non-governmental organization (ngo) introduced to subsistence farmers a modern seed variety with potential to produce...
A non-governmental organization (ngo) introduced to subsistence farmers a modern seed variety with potential to produce ten times more yield than traditional seed varieties. The likelihood of crop failure using modern seeds was higher compared to traditional seeds. The NGO was surprised that the farmers were reluctant to adopt these modern seeds. Explain using risk and uncertainty why this economic behaviour by farmers is rational? What could be done to increase adoption of modern seed varieties by farmers? Short answer...
Think carefully about the overall mission and goals of a non-governmental organization(NGO), such as Doctors Without...
Think carefully about the overall mission and goals of a non-governmental organization(NGO), such as Doctors Without borders or The Nature Conservancy. Required: How does the task of building a balanced scorecard for an NGO differ from that for a profit-seeking enterprise? Choose an NGO that interests you and design a simple balanced scoreboard for them with a minimum of two measures in each of scorecard’s perspectives
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT