subject

While writing a program to regulate the speed of a self-driving car, you find that your software sometimes miscalculates the ideal car speed for city streets to be over 1500 MPH (nearly twice the speed of sound), when it should be approximately 30 MPH. Which of the following strategies would be most efficient to employ in debugging your program?

a. At the very end of the speed calculations, add an additional line of code that divides the calculated speed by 50 so that the program never produces such high speeds
b. After each calculation within your program, insert a temporary statement that displays the most recently calculated value. When running your program, compare the displayed values with the expected values to identify where in the program the error is being introduced.
c. Starting at the end of your program and working backwards, systematically delete each line of code that relates to calculating and re-run the program after each deletion to identify where in the program the error is being introduced
d. Delete all of the code relating to speed calculations and rewrite it again

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Business professionals of america, and future business leaders of america – phi beta lambda are both open to business students at which levels? check all that apply. elementary school middle school high school college
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
question
Computers and Technology, 23.06.2019 20:40
Instruction active describing list features which statements accurately describe the features of word that are used to create lists? check all that apply. the tab key can be used to create a sublist. the enter key can be used to add an item to a list. the numbering feature allows for the use of letters in a list. the numbering feature can change the numbers to bullets in a list. the multilevel list feature provides options for different levels in a list.
Answers: 2
question
Computers and Technology, 24.06.2019 22:10
In command prompt, whats a command that will list only .ini files in c: \windows\system32 directory?
Answers: 1
You know the right answer?
While writing a program to regulate the speed of a self-driving car, you find that your software som...
Questions
question
Biology, 03.02.2020 22:44
Questions on the website: 13722361