Loading

The program I've written doesn't do what its supposed to! I don't have any errors, so I don't even know where to start looking for the problem. Where can I begin?

Learning strategies for isolating issues in non-trivial programs is essential for successful programming of any level. Unlike syntax or run-time errors which can often be looked up online or in a book, a program which is simply not doing what you want often leaves little evidence of what went wrong and where. Though it can be common at first to feel as if identifying these issues requires a stroke of genius or luck, solving them is a teachable skill just like Python syntax or anything else.

One essential habit for helping this problem is learning how to break a problem, and a program, in to smaller chunks. This aids in verifying each bit of code is doing what you intend, and makes fixing the issue easier as well because you don't have to worry as much about affecting something later in the code. For example, writing several Python functions which print the work they've done at their end will make it very clear what didn't go as planned. It also is a great habit for developing a strategy before you code, and for quantitative reasoning in general. Learning how to do this properly can be tricky at first, and may feel very awkward, but it will save time in the long run and will probably become the way you attack all sorts of problems in the future.

Answered by Brendan C. Computing tutor

260 Views

See similar Computing IB tutors
Answered by Brendan C.
Computing tutor

260 Views

See similar Computing IB tutors
A pair of laptops with a tutor displayed on one and a student on the other. The student is raising his hand to answer the teacher's question.
Need help with Computing?

Have a Free Video Meeting with one of our friendly tutors.

A pair of laptops with a tutor displayed on one and a student on the other. The student is raising his hand to answer the teacher's question.
Need help with Computing?

Have a Free Video Meeting with one of our friendly tutors.

A pair of laptops with a tutor displayed on one and a student on the other. The student is raising his hand to answer the teacher's question.
Need help with Computing?

Have a Free Video Meeting with one of our friendly tutors.