Chhetri AcademyGCSE & A level Paper Builder

2.5.2The Integrated Development Environment

OCR GCSE Computer Science (J277) · Algorithms and programming (Paper 2) › Programming languages and IDEs

Practise The Integrated Development Environment. 11 exam-style questions on this subtopic, at up to four difficulty levels, with full mark schemes and a progress tracker. Free, no account needed.

Build a paper on this topic

▶ Watch videos on The Integrated Development Environment (Craig 'n' Dave OCR on YouTube) · Practise all of Programming languages and IDEs

Quick recall

Cover the answers and test yourself. The app has these as flashcards that come back just before you'd forget them.

State what the letters IDE stand for.
Integrated Development Environment

Sample questions

Written for this site in the style of OCR exam questions. They are not taken from real past papers.

Question 1Easy3 marks
(a) State what the letters IDE stand for.[1]
(b) Give two tools or facilities found in an IDE.[2]
Show the answer and mark scheme
(a) Answer: Integrated Development Environment
  • Integrated Development Environment
(b)
  • editor
  • error diagnostics
  • run-time environment
  • translator (compiler / interpreter)
  • debugging tools, e.g. breakpoints / stepping / variable watch
  • syntax highlighting / auto-completion / auto-indentation
Question 2Medium5 marks
(a) A program outputs an incorrect total. Explain how the programmer could use breakpoints and stepping in an IDE to find the error.[4]
(b) State one other IDE feature that helps a programmer find logic errors.[1]
Show the answer and mark scheme
(a)
  • set a breakpoint at (or before) the line(s) where the total is calculated
  • the program runs until the breakpoint and then pauses
  • step through the code one line at a time
  • check the values of the variables at each step to see where the total becomes wrong
(b)
  • variable watch / watch window / trace output (showing variable values while the program runs)
Question 3Hard6 marks
This program should output the mean of five numbers entered by the user.
01 total = 0
02 for i = 1 to 5
03    num = int(input("Enter a number"))
04    total = num
05 next i
06 print(total / 5)
(a) The programmer enters 2, 4, 6, 8 and 10 and expects the output to be 6. State the actual output.[1]
(b) Describe how the programmer could use the tools in an IDE to find the error.[3]
(c) Write a corrected line 04.[1]
(d) Explain why the error diagnostics in the IDE would not report this error.[1]
Show the answer and mark scheme
(a) Answer: 2
  • 2
(b)
  • set a breakpoint inside the loop (e.g. on line 04)
  • step through the loop one iteration / line at a time
  • watch the value of total and see that it is replaced by each number instead of being added to
  • this shows that line 04 contains the error
(c)
  • total = total + num
(d)
  • it is a logic error: the code follows the rules of the language, so it translates and runs

Related subtopics

Stuck? Get 1-to-1 help. Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.

Book a free trial