Question
Which of the following is a common technique used in
debugging to systematically narrow down the location of a bug?Solution
Inserting print statements (or logging) at various points in the code to display variable values, or using a debugger to set breakpoints and step through the code line by line while inspecting the state of variables, are fundamental and highly effective debugging techniques. They help understand the program's flow and identify where the state deviates from expectations.
A train 180 m long crosses a 270 m platform in 27 seconds. Find the speed in km/h.
If the length of a train were halved, it would take 8 seconds to pass a pole. Given that the train's speed is 25 m/sec, determine the time required for ...
A train 120 m long passes a pole in 10 seconds. Find its speed in km/h.
Two trains approach each other at 22 kmph and 25 kmph from 2 places 282 km apart. After how many hours they will meet?
- Two trains βDβ and βEβ of lengths 660 metres and 440 metres respectively are travelling towards each other. Ratio of speed of βDβ to βEβ is...
A person travels a distance of 60 km, some distance he travels by bus and rest of the journey by walking, then he takes 4 hours and 20 minutes. If he ha...
Two trains of same length are running in parallel tracks in the same direction with speed 50 km/hr and 80 km/hr respectively. The latter completely cros...
- Two cyclists βXβ and βYβ start from towns βMβ and βNβ respectively towards each other at the same time. When they meet after 6 hours, cycli...
Train βAβ running with a speed of 19.8 km/hr can cross a standing goods train of 4 times its length in 40 seconds. Find the time taken by 250 metres...
A train of length 300 metres crosses a man standing on platform in 15 seconds. If its speed decreases by 20%, then find the time taken by train to cros...