Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Construct the pseudocode for the following problem: Assume that each input recor

ID: 3936026 • Letter: C

Question

Construct the pseudocode for the following problem: Assume that each input record contains a taxpayer’s name, the value of a personal property belonging to the taxpayer, and a code defining the type of personal property owned.  Each type of property is taxed at a unique rate. The codes, property types, and tax rates follow:

Code

Property type

Tax Rate

1

Bike

2 percent of value

2

Car

4 percent of value

3

Truck

5 percent of value

Your program is to compute the tax for each property and to output a line specifying each taxpayer’s name, value of property, and tax.  The program should output counts of the numbers of bikes, cars, and trucks for which taxes are computed. Output an error message if the input contains an invalid code. Assume a code of 0 indicates the end of the input file or when loop stops.

Code

Property type

Tax Rate

1

Bike

2 percent of value

2

Car

4 percent of value

3

Truck

5 percent of value

Explanation / Answer

input taxpayer_name, property_value, property_code

var tax

var bcount=0, ccount=0,tcount=0

do

if(property_code == 1)

{tax = (property_value*2)/100;

bcount++;}

else if(property_code==2)

{tax = (property_value*4)/100;

ccount++;}

else if (property_code==3)

{tax = (property_value*5)/100;

tcount++;}

else if(property_code!=0 && property_code!=1 && property_code!=3 && property_code!=2)

{Print You entered a wrong code}

Print taxpayer_name, property_value,tax

while(property_code!=0)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote