subject
Social Studies, 28.02.2020 20:53 nourmaali

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: 1

Another question on Social Studies

question
Social Studies, 22.06.2019 04:00
How can congress clarify parts of the constitution that are unclear?
Answers: 1
question
Social Studies, 22.06.2019 07:00
Which of the following was a key accomplishment of the people of songhai? a. they had a strong military and became the largest empire in west africa. b. they established a center of islamic scholarship. c. they worked with iron and prospered from the gold-salt trade. d. they dominated in the trade of ivory, enslaved people, and animal skins.
Answers: 1
question
Social Studies, 23.06.2019 09:30
Which of the following situations best demonstrates the principle of separation of powers in the u.s. government? a. the president can veto laws passed by the legislature. b. the courts must approve constitutional amendments. c. states create their own educational policies. d. members of the legislature are elected by voters.
Answers: 1
question
Social Studies, 23.06.2019 19:40
Explain what led to the conflict within the muslim community. what was the final result of this decision
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
Mathematics, 04.02.2021 01:00
question
Biology, 04.02.2021 01:00
question
Mathematics, 04.02.2021 01:00
question
Mathematics, 04.02.2021 01:00
Questions on the website: 13722363