SHSubjectHub

Subprograms & Random Numbers

OCR J2772.2fGCSELesson packSubscription
Also online

This worksheet marks itself

Set it as homework or classwork and every answer is marked as pupils go, with feedback on what they got wrong. The scores go straight into your mark book, so you can see who needs help before the next lesson.

  • 8 questions
  • 25 marks
  • about 17 minutes
  • marked instantly

Question types: short answer, multiple choice, matching, true or false, multi-part.

Try one from this worksheet

What is the key difference between a procedure and a function?

Pick an answer: it's marked straight away, just as your pupils would see it.

About this resource

Understand procedures, functions, parameters, return values, and how to generate and use random numbers in programs.

17 slides.

Lesson outline

  1. What Are Subprograms?
  2. Procedures
  3. Functions
  4. Code Demo: Procedure vs Function
  5. Procedure or Function?
  6. Parameters and Arguments
  7. Task: Write Subprograms
  8. Calling Subprograms
  9. The Call Stack
  10. Random Number Generation
  11. Seeds and Reproducibility
  12. Code Demo: Random Numbers in Action
Unit bundle2.2 Programming Fundamentals
Part of: 2.2 Programming Fundamentals: the whole unitEvery resource in the unit in one zip.

More from 2.2 Programming Fundamentals