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

Can you help me find any errors by pointing them out and writing the right way i

ID: 3594266 • Letter: C

Question

Can you help me find any errors by pointing them out and writing the right way in this debug



/ This pseudocode should create a ILst that describes records contain a departrent nane (for exasple. "cosaetics") and profits for each auarter for /7 the // the pr(year 7 for this ful1 year eompared to the last full year tast to years. The string department nun salesQuarteriThisrear num salesquarter2Thisyear nun salesquarter3Thisyear nun salesquarter3ThisYear nun salesquarteriLastyear nun salesQuarter2Lastyear num salesquarter3ThisYear nun salesQuarteraLastYear nun totalThisYear nun totallastYear string status nun QUIT "ZZzZ" housekeeping) while department

Explanation / Answer

The mistakes are within compareProfit method

Solution:

if totalThisYear = totalLastYear then

status = "same"

else

if totalThisYear < totalLastYear then

status = "Lower"

else

status ="Higher".

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