This program should count up to a limit input by the user. The program should display the numbers as it counts and display if the number is odd or even.
A bug report has been has been submitted on this program.
It uses a clever formula which we know is correct. However the program says all the numbers are odd, it seems to miss a number and it does not start at 1. We are suspicious of the loop and the IF…ELSE code.
We think there are more that one bug. You will have to experiment a bit to work out a fix. Don’t change too many things at once, always run the program to see what difference a change makes. Undo it if it gets worse!
Can you help fix it?
Run and explore the program to identify errors.
Read the comments and the Python code very carefully Think about what the code should be doing and what it is actually doing. You can also refer to the code clips below to help you fix the errors.
Right click on your code and add a comment explaining what was wrong and how you fixed it.