Why does my computer get hot when I run some code?

Asked by blessing007 · 2 weeks ago

1 Answer

2
amorebise · 2 weeks ago Top Answer

Doing work takes energy! When the CPU is working hard to follow your instructions, it uses electricity and creates heat. It's like how you sweat when you run a race.

If your code is inefficient (like an infinite loop), the CPU has to work much harder, and things get very hot. Good code stays cool!

Log in to add a comment.