How do we identify bugs in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do we identify bugs in python

10th Feb 2017, 10:54 AM
EMMANUEL NUOTAH TUONUO DERY
EMMANUEL NUOTAH TUONUO DERY - avatar
3 Answers
+ 1
Best way is to get other people to look at your program. Sometimes your eyes can get exhaust and you miss one little code.
10th Feb 2017, 11:40 AM
Cltnbatchelor
Cltnbatchelor - avatar
0
Try debuging ^^
10th Feb 2017, 11:49 AM
Jakub Stasiak
Jakub Stasiak - avatar
0
Think like a computer would. A computer will only follow the exact directions it is given. Step through each line of code, and work out on paper what it actually does, not what you think it should do. Usually, if an error is present, you will get a Traceback message that will point you to it (or at least in the right direction). However, not all bugs will produce error messages. That is why it is important to test as you write code, not just at the end. You don't want to bury a bug underneath a pile of working code. P.S. You shouldn't learn to depend on them, but different IDEs provide you with the ability to step through code and identify errors fairly easily.
10th Feb 2017, 3:32 PM
Wesley Duckett
Wesley Duckett - avatar