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
- What Are Subprograms?
- Procedures
- Functions
- Code Demo: Procedure vs Function
- Procedure or Function?
- Parameters and Arguments
- Task: Write Subprograms
- Calling Subprograms
- The Call Stack
- Random Number Generation
- Seeds and Reproducibility
- Code Demo: Random Numbers in Action
Unit bundle2.2 Programming Fundamentals
More from 2.2 Programming Fundamentals
- Lesson pack · 2.2aVariables, Constants, Operators & Data TypesSubscription
- Lesson pack · 2.2bSelection & IterationSubscription
- Lesson pack · 2.2cString ManipulationSubscription
- Lesson pack · 2.2dArrays & RecordsSubscription
- Lesson pack · 2.2eFile Handling & SQLSubscription
- Knowledge organiser · 2.2Programming FundamentalsSubscription
- Scheme of work · 2.2Programming FundamentalsSubscription


