1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Aleks [24]
4 years ago
6

While writing a program to regulate the speed of a self-driving car, you find that your software sometimes miscalculates the ide

al 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
Computers and Technology
1 answer:
Likurg_2 [28]4 years ago
3 0

Answer:

b. <em>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.</em>

Explanation:

Logging statements are an effective debugging technique. It is a good way of finding the location of faulty logic in a program.

One can trace the root problem through logging intermediary outputs.

We can find out from where the program is producing unexpected or unintended calculations, when their's a weird output logged.

You might be interested in
Kandi recently started working at new job and must become familiar with her computer. If she would like to view what software ha
Kamila [148]

i think its D. All Programs

3 0
3 years ago
In what way do media and networks interact? A.) Media are connected to networks tat make information easier to share. B.) Networ
kolbaska11 [484]

Your answer is A.... Hope this helps :)

6 0
4 years ago
Which of the following best describes Vivofit’s purpose?
Daniel [21]
The vivofit by Garmin is a fitness tracker that not only tracks distance, calories burned, and steps — it lasts on one charge for an entire year. Slap it on your wrist and never worry about charging it.
5 0
3 years ago
How is the phrase "employability skills" defined?
Digiron [165]

Answer:

Problem-solving. Why is problem-solving so valued? Companies face a lot of obstacles. Those better able to cope

Explanation:

7 0
3 years ago
Read 2 more answers
_____ technology is a broadband technology that can use the wires of a local telephone network.
Alenkasestr [34]
DSL  - DSL stands for Digital Subscriber Line. This technology came after the Dial Up technology for connecting to the Internet. The big disadvantage of Dial-up technology was that when you were talking on the phone, you could not use the Internet and vice-versa. However, although DSL technology used the regular telephone line , it worked on frequencies different from the telephone. So you could use the phone and the Internet at the same time.
5 0
4 years ago
Other questions:
  • Coretta is thinking about which careers she would enjoy. She considers her personal skills and interests. She enjoys reading and
    13·2 answers
  • Which is true regarding pseudocode?
    9·2 answers
  • You are installing an updated driver for a hardware device on your system. A dialog box displays indicating that Microsoft has d
    15·1 answer
  • Can your computer become infected with a virus via email
    6·1 answer
  • How do say phone in French?
    10·2 answers
  • How can I use internet if data is turned off​
    5·2 answers
  • A company operates on two types of servers: 2 large servers (L) and 4 smaller servers (S), with a combined total of 64GB RAM. Th
    9·1 answer
  • A company has a number of employees. The attributes of EMPLOYEE include Employee ID (identifier), Name, Address, and Birthdate.
    11·1 answer
  • Create a Python program that computes the cost of carpeting a room. Your program should prompt the user for the width and length
    10·1 answer
  • Try my game? https://scratch.mit.edu/projects/589314237
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!