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, 21.06.2019 22:20
Why are people more likely to marry individuals with social and cultural backgrounds very similar to their own? a. parents and other family members always exert pressure to marry within the group. b. people spend a great deal of time alone, and therefore can have few opportunities for meeting people. c. people develop irrational fears of out-group members and are scared to date them. d. people have greater access to individuals like themselves.
Answers: 1
question
Social Studies, 22.06.2019 19:30
The development of simple stone tools by early hominids led to the ability to procure meat more efficiently. this in turn led to the change in diet that included larger amounts of protein. many scholars believe that this shift in diet was a significant part of how our ancient ancestors adapted so quickly to a varied set of environments, and thus were able to begin cultural development. this demonstrates the intimate connection between
Answers: 1
question
Social Studies, 23.06.2019 01:30
Why would nations in latin america be part of a mostly arab cartel group known as opec? a) latin america refused to do business with countries that were not part of opec. eliminate b) natural resources such as oil are a major economic development for some latin american countries. c) latin america has a long history of distrust of the united states and fears a take-over of oil fields. d) latin american nations such as venezuela needed in getting natural resources to other parts of the world. 15
Answers: 1
question
Social Studies, 23.06.2019 06:00
Three thieves agreed to rob a bank. the first was to steal a car to be used for the getaway, the second agreed to procure weapons, and the third would check the bank for cameras. the car thief stole a car and parked it in a lot behind his girlfriend's apartment building. while visiting her the night before the robbery, the car thief suffered a series of convulsive seizures. he was rushed to the hospital where he was placed in the intensive care unit and heavily sedated. meanwhile the two other thieves, unaware of their accomplice's illness, met and decided to rob the bank on their own, despite the absence of a getaway car and driver. they robbed the bank, but were quickly apprehended as they tried to escape and implicated the car thief under police questioning.the car thief can be charged with: a theft of the car only.b conspiracy to commit robbery and theft of the car only.c robbery and theft of the car only.d theft of the car, conspiracy to commit robbery, and robbery.
Answers: 2
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, 06.07.2019 16:30
Questions on the website: 13722366