Robust programs · GCSE · OCR J277 2.5.2, AQA 8525 3.4.4, Edexcel 1CP2 6.1.5 · about 12 min
Editors, error diagnostics, the run-time environment and the translator, in the cell you use.
[1 mark]Which are IDE tools listed by OCR?
Tick every answer that is true.
[1 mark]How does syntax highlighting help a programmer?
[1 mark]What does stepping through a program in a debugger do?
[1 mark]Which IDE feature reports the line and type of an error?
This program should flash the LED three times, beeping each time, and then print flashed 3 times. It has a syntax error, a runtime error and a logic error. Use the squiggle, the error message and Debug to find and fix all three.
# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()
flashes = 0
for i in range(3)
led("blue")
tone(660, 0.1)
wait(0.2)
led("off")
flashes = 1
print("flashed", flashs, "times")Plan your program here, then type it in and press Run.
.py file and open it in another editor. Which features are missing?