Computer science
  • Exam boards
    • OCR past papers >
      • Paper 1 J277 >
        • Paper1 (Sample) J277
        • Practice paper1 J277
      • Paper 2 J277 >
        • Paper 2 J277 Practice
    • Edexcel past papers >
      • 2020 Current spec (coming soon) >
        • Programming Language Subset (PLS)
      • Old 2016 SPEC >
        • Paper 1 (specimen1)
        • Paper 1 (specimen2)
        • Paper 1 (2018)
        • Paper 1 (2019)
        • Paper 2 (specimen1)
        • Paper 2 (2018)
        • Paper 2 (2019)
      • OLD 2013 SPEC >
        • Sample assessment 1 (old spec)
        • Sample assessment 2 (old spec)
        • June 2017 (old spec)
        • June 2016 (old spec)
        • June 2015 (old spec)
    • Paper 1 (by topic) >
      • Algorithms
      • Application software
      • Ascii
      • Binary
      • Cache
      • Client Server
      • Cloud
      • Compression
      • Computational thinking
      • CPU
      • Cyber security
      • Database
      • Fetch decode execute cycle
      • Embedded system
      • Encryption
      • File size
      • Flow chart
      • Hexadecimal
      • High Level language
      • ISP/Internet
      • Logic
      • Magnetic HDD
      • Networking
      • Open source
      • Operating system
      • Peer to peer
      • Images (Data representation)
      • Protocols
      • RAM
      • ROM
      • Run length encoding
      • Simulation software
      • Solid state HDD
      • Sound
      • Stored program concept
      • Utility software
    • Curriculum >
      • Binary
      • Hex
      • Data Representation
      • Compression
      • Encryption
      • What is a computer
      • How does a computer work
      • Hardware
      • Operating system
      • The CPU
      • Input devices
      • Data storage
      • Networks
      • Microcontrollers
      • Computational models
      • Emerging trends
      • Virtual machine
      • Models and simulators
      • Algorithms
    • Python >
      • Finding python
      • GCSE Python questions
      • Python coding >
        • Comments
        • Data types
        • Variables
        • If Else (Selection)
        • If Elif Else (Selection) >
          • Relational/Comparison Operator challenges
          • Selection challenges
        • Functions
        • For loop (iteration)
        • While loop (iteration) >
          • While loop challenges
        • Data structures >
          • Array challenges
          • 2D Array challenges
          • Looping thru 2D array
        • String slicing/indexing >
          • String slicing challenges
        • Subprograms >
          • Subprogram challenges
        • Local/global variable
        • Validation and try
        • methods
        • File I/O >
          • Files - Challenges
        • Pseudocode
        • Modules >
          • Turtle
        • Classes
        • NEA/Projects
  • KS3/Other
    • KS3 >
      • Coding >
        • GameMaker
        • HTML >
          • HTML tags
        • Scratch >
          • Scratch questions
        • Python >
          • Getting started
          • Functions
          • Variables
          • VariablesToo
          • inputs
          • Selection
          • Flowcharts
          • Data types
          • Pseudocode1
          • Pseudocode2
          • Subprogram1
          • Subprogram2
          • Coding challenges
      • Online Safety >
        • Screen time
        • Online Safety questions
      • IT >
        • Word
        • PowerPoint
      • Hardware >
        • All Hardware
        • Magnetic hard disk drive
        • Optical disk drive
        • Solid state drive
      • Logic >
        • CPU
        • AND gate
        • OR gate
        • NOT gate
        • Logical statements
      • Software
      • Binary/Hex/Algorithms >
        • Binary
        • Binary explained
        • Hexadecimal - 1 digit
        • Hexadecimal - 2 digits
        • Algorithms
        • ASCII
      • Networks
      • Protocols/Cyber attacks
    • BTEC CS
    • OCR A-Level >
      • 1.2 (Unit 2) >
        • Functions of an OS
        • Types of OS
        • Application generation
      • 1.2 (Unit 3) >
        • Software development
        • Algorithms
        • Programming paradigms
      • 1.3 (Unit 5) >
        • Networks
      • 1.5 (Unit 9) >
        • Laws and Acts
      • 2.3 (Unit 12) >
        • Analysis and design of algorithms
    • AQA AS-Level CS >
      • AS Curriculum >
        • Multiple choice questions
    • Business studies >
      • Keywords
      • BS Revision - Multiple choice
      • Paper 1 (9-1)
      • Paper 2 (9-1)
    • Junior Science >
      • 01 - Particles >
        • investigations and data
        • Equipment
        • Particles
      • 02 - Cells >
        • Microscope introduced
        • Looking at cells
        • Specialised cells
        • Unicellular organisms
      • 03 - Energy >
        • Energy introduced
        • Energy transfers
        • Conduction, Convection, Insulators
      • 04 - Chemical ideas & reactions >
        • Periodic table
        • Chemical reactions
        • Chemical reactions2
      • 05 - Light and Sound >
        • Light introduced
        • The Eye
        • Colours and filters
        • Waves and Sound
  • Contact/More
    • Code editor
    • Contact us
    • Microbit ideas
    • More
  • Self test
    • 01 Random topics
    • 02 Programming
    • 03 Data
    • 04 Computers
    • 05 Networks
    • 06 Legal/Ethics/Enviro'
    • Coding/Programming

ocr gcse computing

JUNE 2014
Picture

OCR GCSE Computer science J277  "Practice" Paper 2 exam paper can be downloaded here


OCR GCSE Computer science J277  "Practice" Paper 2 mark scheme can be downloaded here

Picture
Picture
Picture
Picture
1A Answer
Picture


More help here -
Picture
1B answer
1 mark per bullet, max 4
e.g.
Editor
  • …to enable program code to be entered / edited
Error diagnostics / debugger
  • …to display information about errors / location of errors / suggest solutions
Run-time environment
  •  …to enable program to be run / to check for run-time errors / test the program​

More help here -
Picture
Picture
2bi answer
Picture


More help here -

Picture
2bi answer
An error that does not cause the program to crash // produces unexpected output​

More help here - 
Picture
2bii answer
1 mark per bullet, max 4
  • Line 02 // empty = 0
  • Will reset empty to 0 on each iteration of the loop
  • Line 07 // print (“empty”)
  • Will print out the string “empty” instead of the value held in the variable
​
More help here - 
Picture
2ci answer
1 mark per bullet, max 4
  • Compare 5 (middle value) to 7
  • 5 is smaller than 7 / 7 is larger than 7 so…
  • discard lower part of list / repeat with upper part of list
  • …compare 7 to 7 (item found)​

More help here -
Picture
2cii answer
1 mark per bullet, max 2
  • List of size 1 to compare
  • …and item not matched to search term

More help here -
Picture
2ciii answer
More efficient // Less time taken (to find item) // fewer comparisons to make (with large lists)​

More help here -
Picture
3a answer
Picture
 

More help here - 
Picture
3b answer
 • Logically compares A AND // correct nested IF
• …B OR C // correct sequential IF
• Output in both cases (with attempt at selection).

A = input("Is the customer 15 or over?")
B = input("Does the customer have a ticket?")
C = input("Does the customer money to buy a ticket")
if A AND (B OR C) then
   print ("allowed")
else
   print ("not allowed")
endif

Accept answers where inputs are given as strings e.g :
if A == “Yes” AND (B == “Yes” OR C == “Yes”) then
   print ("allowed")
else
   print ("not allowed")
endif

More help here - 
Picture
3c answer
freeseats called with "Red"
…returned value assigned to variable redseats

​ redseats = freeseats("Red")

More help here - 
Picture
4ai answer
Hiding / ignoring / removing detail // focussing on certain parts of a problem 

More help here - 
Picture
4aii answer
  • Focus on age / number of miles
  • Ignore other factors (such as make, model, etc) 

More help here - 
Picture
4aiii answer
  • Ensures only certain users can access the system
  • Using password / other example of authentication technique

More help here - 
Picture
4bi answer
  • Miles and age input separately
  • Checks for valid mileage
  • Checks for valid age
  • Checks both are greater than / greater than equal to zero
  • …correctly outputs both True and False

miles = input("enter miles driven")
age = input("enter age of car")
valid = True
if miles > 10000 or miles < 0 then
   valid = False
elseif age > 5 or age < 0 then
   valid = False
endif
print(valid)

More help here -
Picture
4bii answer
Picture
1 mark per row, max 3
Normal : miles (0 – 9,999), age (0 - 5)
Erroneous/Invalid: miles (less than 0, larger than 9,999), age (less than 0 / more than 5) // non-numeric data
Boundary : miles (-1/0 / 9,999 / 10,000), age (-1/0 / 5/6)


​
More help here -

Picture
4biii answer
During development // whilst writing the program // before development is complete.​

More help here - 
Picture
Picture
5Di answer
1 mark per bullet, max 6
• Inputs the current battery charge percentage
• Outputs “full” if 100%
• Calculates the amount to charge
• Calculates the time in minutes…
• …converts to hours and minutes
• Outputs the time in hours and minutes​

e.g.
charge = input("enter battery charge")
if charge == 100 then
   print(“full”)
else
   time = (100-charge) * 10
   hours = time DIV 60
   mins = time MOD 60
   print (hours, mins)
endif


More help here -
Picture
Picture
5a answer
One mark per correct choice
SELECT ItemCode, ItemName
FROM tblStock
WHERE Price >=60

More help here -
Picture
Picture
5bi answer
Picture



More help here -
Picture
5bii answer
One mark per bullet point
  • Input and store price
  • Check if price is > 200…
  • …if true, reduce price by 40
  • Check if price is >100 and not >200…
  • ...if true, reduce price by 20
  • Output price​

e.g.
price = input("enter price")
if price > 200 then
   price = price – 40
elseif price > 100 then
   price = price - 20
endif
print(price)

More help here -
Picture
Picture
5c answer
  • checking both values (e.g. or changed to and if appropriate)
  • if statement in correct format (e.g. checking against stocklevel for each condition)
  • if statement uses correct comparisons (e.g. >= and <=)
  • print statements in correct position
  • print statements include string delimiters (e.​g. speech marks) around both string outputs

Do not accept pseudocode / natural language.
e.g.
stocklevel = input("Enter stock level")
if stocklevel >= 5 and stocklevel <= 25 then
   print("In demand")
else
   print("Not in demand")
endif

Alternative example
stocklevel = input("Enter stock level")
if stocklevel < 5 or stocklevel > 25 then
   print("Not in demand")
else
   print("In demand")
endif
As a matter of principle, a candidate who refines the program to work fully but in a different format to that specified should gain full marks.

More help here -


More help here -
Picture
Picture
5di answer
One mark per bullet point, in the correct place
• size // len(discountcodes-1)
• code
• price // newprice
• [x,1] // [x][1]
• return newprice // checkdiscount = newprice​

function checkdiscount(price, code)
   newprice = price
   size = len(discount)-1
   for x = 0 to size
      if discount[x,0] == code then
         newprice = price – discount[x,1]
   endif
   next
   return newprice
endfunction

More help here -
Picture
5dii answer
newprice
size
x
​
More help here -
Picture
Picture
5diii answer
  • asks for price and discount code to be input
  • …passes both to the checkdiscount() function as parameters…
  • ...stores / uses returned value
  • calculates total of all prices entered/returned
  • repeats until 0 is entered as price
  • outputs calculated total

e.g.
total = 0
do
   price = input("Enter a price")
   code = input("Enter a discount code")
   newprice = checkdiscount(price, code)
   total = total + newprice
until price == 0
print(total)

alternative example
total = 0
price = 1
while price != 0
   price = input("Enter a price")
   code = input("Enter a discount code")
   total = total + checkdiscount(price, code)
endwhile
print(total)

More help here -
Home
Contact
  • Exam boards
    • OCR past papers >
      • Paper 1 J277 >
        • Paper1 (Sample) J277
        • Practice paper1 J277
      • Paper 2 J277 >
        • Paper 2 J277 Practice
    • Edexcel past papers >
      • 2020 Current spec (coming soon) >
        • Programming Language Subset (PLS)
      • Old 2016 SPEC >
        • Paper 1 (specimen1)
        • Paper 1 (specimen2)
        • Paper 1 (2018)
        • Paper 1 (2019)
        • Paper 2 (specimen1)
        • Paper 2 (2018)
        • Paper 2 (2019)
      • OLD 2013 SPEC >
        • Sample assessment 1 (old spec)
        • Sample assessment 2 (old spec)
        • June 2017 (old spec)
        • June 2016 (old spec)
        • June 2015 (old spec)
    • Paper 1 (by topic) >
      • Algorithms
      • Application software
      • Ascii
      • Binary
      • Cache
      • Client Server
      • Cloud
      • Compression
      • Computational thinking
      • CPU
      • Cyber security
      • Database
      • Fetch decode execute cycle
      • Embedded system
      • Encryption
      • File size
      • Flow chart
      • Hexadecimal
      • High Level language
      • ISP/Internet
      • Logic
      • Magnetic HDD
      • Networking
      • Open source
      • Operating system
      • Peer to peer
      • Images (Data representation)
      • Protocols
      • RAM
      • ROM
      • Run length encoding
      • Simulation software
      • Solid state HDD
      • Sound
      • Stored program concept
      • Utility software
    • Curriculum >
      • Binary
      • Hex
      • Data Representation
      • Compression
      • Encryption
      • What is a computer
      • How does a computer work
      • Hardware
      • Operating system
      • The CPU
      • Input devices
      • Data storage
      • Networks
      • Microcontrollers
      • Computational models
      • Emerging trends
      • Virtual machine
      • Models and simulators
      • Algorithms
    • Python >
      • Finding python
      • GCSE Python questions
      • Python coding >
        • Comments
        • Data types
        • Variables
        • If Else (Selection)
        • If Elif Else (Selection) >
          • Relational/Comparison Operator challenges
          • Selection challenges
        • Functions
        • For loop (iteration)
        • While loop (iteration) >
          • While loop challenges
        • Data structures >
          • Array challenges
          • 2D Array challenges
          • Looping thru 2D array
        • String slicing/indexing >
          • String slicing challenges
        • Subprograms >
          • Subprogram challenges
        • Local/global variable
        • Validation and try
        • methods
        • File I/O >
          • Files - Challenges
        • Pseudocode
        • Modules >
          • Turtle
        • Classes
        • NEA/Projects
  • KS3/Other
    • KS3 >
      • Coding >
        • GameMaker
        • HTML >
          • HTML tags
        • Scratch >
          • Scratch questions
        • Python >
          • Getting started
          • Functions
          • Variables
          • VariablesToo
          • inputs
          • Selection
          • Flowcharts
          • Data types
          • Pseudocode1
          • Pseudocode2
          • Subprogram1
          • Subprogram2
          • Coding challenges
      • Online Safety >
        • Screen time
        • Online Safety questions
      • IT >
        • Word
        • PowerPoint
      • Hardware >
        • All Hardware
        • Magnetic hard disk drive
        • Optical disk drive
        • Solid state drive
      • Logic >
        • CPU
        • AND gate
        • OR gate
        • NOT gate
        • Logical statements
      • Software
      • Binary/Hex/Algorithms >
        • Binary
        • Binary explained
        • Hexadecimal - 1 digit
        • Hexadecimal - 2 digits
        • Algorithms
        • ASCII
      • Networks
      • Protocols/Cyber attacks
    • BTEC CS
    • OCR A-Level >
      • 1.2 (Unit 2) >
        • Functions of an OS
        • Types of OS
        • Application generation
      • 1.2 (Unit 3) >
        • Software development
        • Algorithms
        • Programming paradigms
      • 1.3 (Unit 5) >
        • Networks
      • 1.5 (Unit 9) >
        • Laws and Acts
      • 2.3 (Unit 12) >
        • Analysis and design of algorithms
    • AQA AS-Level CS >
      • AS Curriculum >
        • Multiple choice questions
    • Business studies >
      • Keywords
      • BS Revision - Multiple choice
      • Paper 1 (9-1)
      • Paper 2 (9-1)
    • Junior Science >
      • 01 - Particles >
        • investigations and data
        • Equipment
        • Particles
      • 02 - Cells >
        • Microscope introduced
        • Looking at cells
        • Specialised cells
        • Unicellular organisms
      • 03 - Energy >
        • Energy introduced
        • Energy transfers
        • Conduction, Convection, Insulators
      • 04 - Chemical ideas & reactions >
        • Periodic table
        • Chemical reactions
        • Chemical reactions2
      • 05 - Light and Sound >
        • Light introduced
        • The Eye
        • Colours and filters
        • Waves and Sound
  • Contact/More
    • Code editor
    • Contact us
    • Microbit ideas
    • More
  • Self test
    • 01 Random topics
    • 02 Programming
    • 03 Data
    • 04 Computers
    • 05 Networks
    • 06 Legal/Ethics/Enviro'
    • Coding/Programming