Part 1 The following 2 debugging assignments begins with some comments (lines that begin with 2 slashes) that describes the program. Examine the pseudocode that follows the introductory comments. Discover the syntax and logic errors and fix the pseudocode in the area labeled, Correct the pseudocode below. Pseudocode Debugging Exercise 1 // This pseudocode is intended to compute the number // of miles per gallon you get with your automobile. start input milesTraveled input gallonsOfGasUsed milesPerGallon = milesTraveled + gallonsOfGas output milsperGallon start Correct the pseudocode below Pseudocode Debugging Exercise 1 // This pseudocode is intended to compute the number // of miles per gallon you get with your automobile. start input milesTraveled input gallonsOfGasUsed milesPerGallon = milesTraveled + gallonsOfGas output milsperGallon start Pseudocode Debugging Exercise 2 // This pseudocode is intended to describe // computing the per day cost of your rent // in a 30-day month start input rent costPerDay = rent * 31 output rent stop Correct the pseudocode below Pseudocode Debugging Exercise 2 // This pseudocode is intended to describe // computing the per day cost of your rent // in a 30-day month start input rent costPerDay = rent * 31 output rent stop Part 2 The following debugging assignment contains a flowchart that contains syntax and/or logical errors. Examine the flowchart and then find and correct all the bugs. Use Draw.io to draw your corrected flowchart. Save your corrected flowchart as a .drawio file (Use the Save As option in Drawio). Export your flowchart as a JPG file (Export JPG option in Drawio). Insert the picture (JPG file saved in the step above) in the space provided below. Debugging Exercise 3 Put corrected Debugging Exercise 3 here:
Unit 1 Debugging Exercises
Part 1
The following 2 debugging assignments begins with some comments (lines that begin with 2 slashes) that describes the program. Examine the pseudocode that follows the introductory comments. Discover the syntax and logic errors and fix the pseudocode in the area labeled, Correct the pseudocode below.
Pseudocode Debugging Exercise 1
// This pseudocode is intended to compute the number
// of miles per gallon you get with your automobile.
start
input milesTraveled
input gallonsOfGasUsed
milesPerGallon = milesTraveled + gallonsOfGas
output milsperGallon
start
Correct the pseudocode below
Pseudocode Debugging Exercise 1
// This pseudocode is intended to compute the number
// of miles per gallon you get with your automobile.
start
input milesTraveled
input gallonsOfGasUsed
milesPerGallon = milesTraveled + gallonsOfGas
output milsperGallon
start
Pseudocode Debugging Exercise 2
// This pseudocode is intended to describe
// computing the per day cost of your rent
// in a 30-day month
start
input rent
costPerDay = rent * 31
output rent
stop
Correct the pseudocode below
Pseudocode Debugging Exercise 2
// This pseudocode is intended to describe
// computing the per day cost of your rent
// in a 30-day month
start
input rent
costPerDay = rent * 31
output rent
stop
Part 2
The following debugging assignment contains a flowchart that contains syntax and/or logical errors.
- Examine the flowchart and then find and correct all the bugs.
- Use Draw.io to draw your corrected flowchart.
- Save your corrected flowchart as a .drawio file (Use the Save As option in Drawio).
- Export your flowchart as a JPG file (Export JPG option in Drawio).
- Insert the picture (JPG file saved in the step above) in the space provided below.
Debugging Exercise 3
Put corrected Debugging Exercise 3 here:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images