Break statements and why I’ll dock marks for them
Right, break statements and why they’re bad. Generally it’s indicating you’ve got a problem with the flow of your program and you may need to restructure. Imagine the following that hunts for a number, it’s an odd program, but it’s an illustration. # x = some number you’re hunting forx = 56for i in range(100): …. Read More
Globals
The problem with globals, and why you should use subroutines When you’re writing something like a binary converter it isn’t too bad, but the code can start to get messy, with whole chunks of the program being in loops and things like that making tweaks and debugging more tricky. When you start writing a program …. Read More