Question-92: When you run below program, what would be printed on console.
You are entering input as 100000
A= int(input("Enter your income to calculate tax:"))
tax=0;
if A> 100000:
tax=A*30/100 ;
tax= tax + tax*3.33/100;
print ( "Your tax amount is " , round(tax))
elif 50000 < A< 100000:
tax=A*20/100;
tax= tax + tax*3.33/100;
print ( "Your tax amount is " , round(tax))
else :
print ( "Your tax amount is " , round(tax))
- Your tax amount is 0
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Answer: A
Exp:
- If your income is more than or equal to 1 Lakh (.1 Million), you need to pay 30% tax
- If your income is more than 50K and less than Lakh (.1 Million), you need to pay 30% tax
- If you are liable to pay tax, then you have to pay 3.33% cess as well on calculated tax amount.
- Execute below program, and provide input and check what is your tax liability.
- Can you catch a loophole, in this program for calculation?
A= int(input("Enter your income to calculate tax:")) tax=0;
if A> 100000: print ( "You need to pay 30% tax") tax=A*30/100 ; tax= tax + tax*3.33/100; print ( "Your tax amount is " , round(tax)) elif 50000 < A< 100000:
You can access to full explanation to question and answer from this page. |
Loophole: We are not rightly calculating tax, when
You can access to full explanation to question and answer from this page.