Answer:
TAX_RATE = 0.20
STANDART_DEDUCTION = 10000.0
DEPENDENT_DEDUCTION = 3000.0
gross_income = float(input("Enter the gross income: "))
number_of_dependents = int(input("Enter the number of dependents: "))
income = gross_income - STANDART_DEDUCTION - (DEPENDENT_DEDUCTION * number_of_dependents)
tax = income * TAX_RATE
print ("The income tax is $" + str(round(tax, 2)))
Explanation:
Define the <em>constants</em>
Ask user to enter the <em>gross income</em> and <em>number of dependents</em>
Calculate the <em>income</em> using formula (income = gross_income - STANDART_DEDUCTION - (DEPENDENT_DEDUCTION * number_of_dependents))
Calculate the <em>tax</em>
Print the <em>tax</em>
<em />
round(number, number of digits) -> This is the general usage of the <em>round</em> function in Python.
Since we need <u>two digits of precision</u>, we need to modify the program as str(<u>round(incomeTax, 2</u>)).
You must have an administrator password before you can access the drive <span />
Answer:
For question a, it simplifies. If you re-express it in boolean algebra, you get:
(a + b) + (!a + b)
= a + !a + b
= b
So you can simplify that circuit to just:
x = 1 if b = 1
(edit: or rather, x = b)
For question b, let's try it:
(!a!b)(!b + c)
= !a!b + !a!bc
= !a!b(1 + c)
= !a!b
So that one can be simplified to
a = 0 and b = 0
I have no good means of drawing them here, but hopefully the simplification helped!
Answer: The amount of interest to be paid is $972
Explanation: This is gotten by firstly getting the amount of money to return per year without the interest which is $114400/10(years)= 11440
11440 is to be paid per year without interest. To get amount of interest is $11440*8.5/100 = $972 this is the amount of interest to be paid per year including in year 2.
Therefore, total amount of money together with interest to be paid each year and in year 2 = $11440+$972=12412.