Question

In: Computer Science

1. Imagine that the IRA is giving a stimulus package in the COVID-19 season. The package...

1. Imagine that the IRA is giving a stimulus package in the COVID-19 season. The package amount is determined by the number of adults in the family and the total amount of salary the family gets.

Each adult will get 1200 dollars if the total salary is 100000 or less.

Each adult will get 800 dollars if the total salary is 150000 or less.

Write a python program to ask the user the number of adults in the family and the total number of family salary and determine the total amount of stimulus package the IRA will provide for that family.

Solutions

Expert Solution

Hi,

Hope you are doing fine. I have written the above program in python adhering to all the conditions mentioned in the problem. The logic and the program is explained clearll using the comments (highlighted in bold) provided above each line.

Program:

#Taking the number of adults in the family from user and converting it to integer as the input is always taken in string format
number_of_adults=int(input("Please enter the number of adults in the family: "))

#Taking the total salary of the family from user and converting it to integer as the input is always taken in string format
total_salary=int(input("Please enter the total salary of family: "))

#if the total salary is less than or equal to 100000 then package is given at 1200 per adult
if total_salary<=100000:
ira=number_of_adults * 1200
  
# else if total salary is less than or equal to 150000 then package is given at 800 per adult. This will only execute if total salary is between 100001 and 150000
elif total_salary<=150000:
ira=number_of_adults * 800

#Note that there is no condition mentioned for ira greater than 150000 in the question.

#Printing the package provided by the ira
print("The total amount of stimulus package the IRA will provide for the family is: {}".format(ira))

Executable code snippet of the program from jupyter notebook:

Output:


Related Solutions

this is a python code: QUESTION 3: Imagine that the IRA is giving stimulus package in...
this is a python code: QUESTION 3: Imagine that the IRA is giving stimulus package in the COVID-19 season. The package amount is determined by the number of adults in the family and the total amount of salary the family gets. Each adult will get 1200 dollars if the total salary is 100000 or less. Each adult will get 800 dollars if the total salary is 150000 or less. Write a python program to ask the user the number of...
Show the impact of Covid-19 on the Australian economy. How did the stimulus package impact the...
Show the impact of Covid-19 on the Australian economy. How did the stimulus package impact the Australian economy? Explain your answer with the help of aggregate demand and supply model. What are implications of Covid-19 on the government budget.
Australia’s stimulus package to cushion the economic impact of COVID-19 pandemic is nearly 15% of 2019...
Australia’s stimulus package to cushion the economic impact of COVID-19 pandemic is nearly 15% of 2019 GDP. Notable initiatives include: JobKeeper Payment ($1,500/fortnight), JobSeeker Payment ($550/fortnight), and Coronavirus Supplement ($550/fortnight). Using the AD-AS framework, explain how these initiatives will help the economy deal with the economic fallout from COVID-19.(the answer is expected to be around 200 words.)
the zambian government aprroved a k8 billion ($439 million) COVID-19 bond economic stimulus package to alleviate...
the zambian government aprroved a k8 billion ($439 million) COVID-19 bond economic stimulus package to alleviate the pandemics impact on the economy.to this effect, the central bank issued K2.67 billion COVID -19 bond on the 27th of july,2020.assuming that the central bank issued a 5 year bond with par value of K100.00 at a price of K77.35 with a 11% coupon rate, advise,as an investment consultant a client who wants to invest K50,000; 1) The expected annalised fixed coupon income...
The risk of the stimulus monetary policy in the covid-19
The risk of the stimulus monetary policy in the covid-19
the risk of the stimulus fiscal policy in the Covid-19
the risk of the stimulus fiscal policy in the Covid-19
Would the COVID-19 stimulus be expanding the money supply?
Would the COVID-19 stimulus be expanding the money supply?
Three ways in which the Coronavirus Stimulus Package differs from the 2009 Stimulus Package.
Three ways in which the Coronavirus Stimulus Package differs from the 2009 Stimulus Package.
It is the start of the Flu Season and we are still in the Covid-19 disease's...
It is the start of the Flu Season and we are still in the Covid-19 disease's clutches. Financially what has happened to the healthcare industry to this date? What are the future financial implications for healthcare organizations if, now, we have two separate but similar diseases confronting us? There is a whole lot to consider operationally for both healthcare organizations and for communities. Part of being an effective healthcare manager is a proactive approach that anticipates events that impact your...
Many individuals who receive a stimulus check as a result of COVID- 19 will receive a...
Many individuals who receive a stimulus check as a result of COVID- 19 will receive a $1200 direct deposit. Individuals earning between 75k and 99k will only receive a fraction of the $1200 deposit. Suppose Debra earned above 75k in 2018 and 2019 and only receives a $1000 direct deposit stimulus. Using the bank ledger, we have seen in class, and assuming the required reserve ratio is .7, show three bank deposits from the initial round of spending. What is...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT