Practise 25 exam-style questions on The Integrated Development Environment (IDE) for OCR GCSE Computer Science (Paper 2). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with the Study Helper on hand if you get stuck.
25 questions
1–6 marks each
Instant marking
No sign-up needed
20 questions, marked as you go
Sample questions with model answers
Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.
Question 1
2 marks
Describe what an IDE is.
Model answer
An IDE is a piece of software that provides a set of tools in one place to help programmers develop programs - for example an editor to write the code, a translator to convert it into machine code, and debugging tools to find errors.
Explanation
An IDE is not a language: it is an application used to write programs in a language. Its value is that writing, translating, running, testing and debugging can all be done in one environment instead of switching between separate programs. Good descriptions say what it is (software with a set of tools) and what it is for.
Mark scheme
1 mark
software / a program / an application that provides a set of tools (in one place)
Accept 'a single program containing several tools'.
1 mark
to help programmers write / edit, translate, run, test or debug programs
At least one development activity must be given. Accept a named tool with its purpose, e.g. 'it includes an editor for writing code and a translator to run it'. Do not accept 'a programming language'.
Question 2
2 marks
Explain how stepping through a program helps a programmer to find a logic error.
Model answer
Stepping runs the program one line at a time. After each line the programmer can see which line runs next and how the variables have changed, so they can spot the exact line where a value becomes wrong or the wrong branch is taken.
Explanation
A logic error does not stop the program, so no error message appears - the program simply gives the wrong result. Stepping slows execution down to one line at a time so the programmer can follow the logic and compare what actually happens with what should happen.
Mark scheme
1 mark
the program is executed one line / statement at a time (each time the programmer chooses)
1 mark
the programmer can watch the order the lines run in / see variable values change after each line / see which branch is taken, so they can find the line where the result goes wrong
Do not accept 'it finds the logic error automatically' or 'it shows syntax errors'.
Question 3
2 marks
A programmer clicks Run in their IDE. The program starts, but then stops with the message "Run-time error: division by zero on line 12".
Explain how the IDE has helped the programmer to deal with this error.
Model answer
The run-time environment ran the program within the IDE and caught the error when it happened. Its message says what went wrong and gives the line number, so the programmer can go straight to line 12 and check why the value being divided by is zero.
Explanation
Some errors only appear when the program runs with particular data, such as dividing by a value that turns out to be zero. The translator cannot detect these in advance, but the IDE's run-time environment catches them and reports the type and location. The programmer can then use a breakpoint or watch to find out why the value was zero.
Mark scheme
1 mark
the run-time environment ran the program inside the IDE and caught / detected the error when it happened (instead of the program just crashing)
Max 2 marks in total.
1 mark
the error message gives the type of error and the line number, so the programmer can go straight to line 12 to fix it
1 mark
the programmer could set a breakpoint before line 12 / use a watch to see which variable is 0 at that point
Do not accept 'the translator found the error before the program ran' - a division by zero only happens while the program is running.
Question 4
4 marks
Explain the difference between a syntax error and a logic error, and identify an IDE tool that would help a programmer to find each type of error.
Model answer
A syntax error breaks the rules of the programming language, such as a misspelt keyword or a missing bracket, so the program cannot be translated. A logic error lets the program run, but it gives the wrong result. Syntax errors can be found using the IDE's error diagnostics, which report the line and type of error. Logic errors can be found using breakpoints and stepping, with a variable watch to see where values go wrong.
Explanation
The two types of error need different tools. A syntax error is found by the translator, so error diagnostics can report exactly where it is. A logic error produces no message, so the programmer must watch the program run - pausing it with breakpoints, stepping line by line and checking variable values.
Mark scheme
1 mark
a syntax error breaks the rules / grammar of the programming language, so the code cannot be translated / run
1 mark
a logic error: the program runs but produces an incorrect / unexpected result
Do not accept error diagnostics for logic errors - they do not report logic errors.
Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.
Ctrl + Enter to check
Study HelperHints first, answers after you try
Stuck on this one? Ask for a hint and I’ll point you in the right direction, without giving the answer away. Once you’ve checked your answer, I’ll show you how the marks are awarded.