Houser_MatthewFix1_M02

docx

School

ITT Tech *

*We aren’t endorsed by this school

Course

1110

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

4

Uploaded by housermatt87

Report
Matthew Houser SDEV 120 M02 Debugging Exercise Debugg 1 // This pseudocode segment is intended to compute and display // the average grade of three tests start Declarations num test1 num test2 num test3 num average output "Enter score for test 1 " input test1 output "Enter score for test 2 " input test2 output "Enter score for test 3 " input test3 average = test1 + test2 + test3 / 3 output "Average is ", answer stop Debugg 2 start Declarations num test1 num test2
num test3 num average housekeeping() while test1 >= 0 mainLoop() endwhile endOfJob() stop housekeeping() output "Enter score for test 1 or a negative number to quit" input test1 return mainLoop() output "Enter score for test 2" input test2 output "Enter score for test 3" average = (test1 + test2 + test3) / 3 output "Average is ", average output "Enter score for test 1 or a negative number to quit" input test1 return endOfJob() output "End of program" return
Debugg 3 start Declarations num mortgagePayment num utilities num taxes num upkeep num total startup() while mortgagePayment not equal to 0 MainLoop() endwhile finishUp() stop startUp() output "Enter your mortgage payment or 0 to quit" input mortgagePayment return mainLoop() output "Enter utilities" input utilities output "Enter taxes" input taxes output "Enter amount for upkeep" input upkeep total = mortgagePayment + utilities + taxes + upkeep
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
output "Total is ", total return finishUp() output "End of program" return Debugg 4 Change housekeep to housekeeping Change QUIT? In the dimond box to QUIT Need to change the order in the detailloop (output name, total) needs to go after the (output PROMPT1)