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

1092 Views

See similar Computing IB tutors

Related Computing IB answers

All answers ▸

What is data validation and data verification?


What is encapsulation?


Define how recursion works


What are adventages and disadventages of encryption network security?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy