BASIC/PYTHON programming language. this is basic class not c++.Please submit bas
ID: 3565451 • Letter: B
Question
BASIC/PYTHON programming language. this is basic class not c++.Please submit basic.
This is a variation of earlier program.
Using the Do...loop until, Write a program to input the salary. If the salary is over 100,000 then calculate the federal tax at 20% otherwise calculate the federal tax 15%. Display the federal tax.
Calculate the statetax at the rate of 5%
Also, Count the number of people who earned salaries in the following ranges.
1) More than 100000
2) More 50000 and less than 100000
3) More than 25000 and less than 50000
4) Below 25000
Ask the user if he/she wants to continue. If the user says
Explanation / Answer
SALARY=0
FedTaxRate1=0.20
FedTaxRate2=0.15
PROMPT "Employee Name" ; Answer
PROMPT "What is your Annual Salary?" ; SALARY
PROMPT "Do you want continue?" ; Answer
int a=0,b=0,c=0,d=0;
FOR Answer$= yes
IF (SALARY > 100000){
a++ ;
THEN Result=(SALARY * FedTaxRate1) + (SALARY * WTAX)
}
IF (50000<SALARY <= 100000)
b++;
THEN Result=(SALARY * FedTaxRate2) + (SALARY * WTAX)
}
IF (25000<=SALARY <= 50000)
{
c++;
THEN Result=(SALARY * FedTaxRate1) + (SALARY * WTAX)
}
IF (SALARY < 25000)
{
d++;
THEN Result=(SALARY * FedTaxRate2) + (SALARY * WTAX)
}
Print "Net Wages = $" ; SALARY - Result
FOR Answer$= NO;
exit;
NEXT Answer$
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.