Answer:
#here is code in python
#read the jackpot amount
amount=float(input("please enter the jackpot amount:"))
#read choice of payment
user_choice=input("enter your choice of payment(1 for cash, 2 for installments):")
#if choice is cash
if user_choice=='1':
#instant amount before tax
b_tax=amount*.65;
#instant amount after tax
a_tax=(amount*.70)*.65;
print("instantly received amount before tax : ",b_tax)
print("instantly received amount after tax : ",a_tax)
#if choice is installment
elif user_choice=='2':
#installment amount before tax
b_tax=amount/20;
#installment amount after tax
a_tax=(amount*.70)/20;
print("installment amount before tax : ",b_tax)
print("installment amount before tax : ",a_tax)
Step-by-step explanation:
Read the jackpot amount from user.Next read the choice of Payment from user. If user's choice is cash then calculate 65% instantly amount received by user before and after the 30% tax.Print both the amount.Similarly if user's choice is installments then find 20 installments before and after 30% tax.Print the amount before and after the tax.
Output:
please enter the jackpot amount:2000
enter your choice of payment(1 for cash, 2 for installments):2
installment amount before tax : 100.0
installment amount before tax : 70.0