Final answer:
The term "bug" for a computer error was popularized by Grace Hopper in 1947 after a moth was found in a computer circuit, although it had been used in engineering and aviation before.
Step-by-step explanation:
In 1947, the term "bug" is believed to have been coined by Grace Hopper when a moth was found causing an error in the Harvard Mark II computer. Grace Hopper was a pioneering computer scientist and U.S. Navy Rear Admiral who played a significant role in the early days of computing. The term has since become widely used to refer to problems or glitches in computing and electronics.
Although the concept of a 'bug' in machinery predates the incident involving Grace Hopper, the discovery of the actual moth helped popularize the term in relation to computer errors. Hence, she is often credited with coining the term in the context of computer science though it was used in engineering and aviation before.