Conditionals Business#

Section Title: Conditionals Business

Business Applications#

Question-1: Discount#

An online store offers discounts based on the amount you spend:

  • No discount for spending less than 100 dollars.

  • 20% discount for spending between 100 and 150 dollars.

  • 30% discount for spending between 150 and 200 dollars.

  • 40% discount for spending over 200 dollars.

Write a program that prompts the user to enter their total spending and returns the final price after applying the appropriate discount, adding a 6% tax, and including a 3% shipping fee.

Question-2: Loan Approval#

Write a program that prompts the user to enter their credit score and the amount they want to apply for using two input() functions. The program should return the approval decision based on the following table:

Credit Score

Loan Amount

Decision

less than or equal to 600

less than or equal to 10,000

Approved

less than or equal to 600

greater than 10,000

Deny

between 600 and 800

less than or equal to 30,000

Approved

between 600 and 800

greater than 30,000

Deny

greater than or equal to 800

less than or equal to 50,000

Approved

greater than or equal to 800

greater than 50,000

Deny

Question-3: Tax#

IRS uses he following table to determine the tax amount for a single person.

Tax Rate

on taxable income from …

up to …

10%

0

11,000

12%

11,001

44,725

22%

44,726

95,375

24%

95,376

182,100

32%

182,101

231,250

35%

231,251

578,125

37%

578,126

and up

  • You pay tax based on income levels called tax brackets.

  • As your income increases, the tax rate for each new level goes up.

  • When you move to a higher tax bracket, you don’t pay the higher rate on all your income.

  • You only pay the higher rate on the income within the new bracket.

Example If your income is 100,000 dollars, the tax you pay is the sum of the taxes from each tax bracket your income falls into. Therefore it is the sum of:

Write a program that prompts the user to enter their income and returns the corresponding tax amount based on th etable above.

Question-4: Bucket Strategy#

A finance company offers three investment products based on different risk levels:

  • Conservative: 60% in interest, 30% in gold, 10% in stocks.

  • Moderate: 30% in interest, 40% in gold, 30% in stocks.

  • Aggressive: 10% in interest, 30% in gold, 60% in stocks.

Write a program that prompts the user to enter their investment amount and the type of investment using two input() functions.

The program should then calculate and return the gain or loss based on the following rates: an interest gain rate of 3%, a gold gain rate of 2%, and a stock loss rate of 3.5%.

  • The risk level input is not case-sensitive.

Sample Output:
Please enter the risk type (Conservative/Moderate/Aggressive): Moderate
Please enter the investment amount: 1800
Change: 11.7