Computing
Computer Science LearnITWithMrC ⛯ Year 7 Year 8 Year 9 GCSE
Responsive image

Lesson Video

25

Lesson Tasks

  • Watch the Lesson video
    Make notes on your notes sheet.
  • Read the lesson notes
    Make notes on your notes sheet.
  • Complete the learning activities
    Make any notes on your notes sheet.
  • Check the Learning outcomes
    Update your learning objectives

What do I need to Learn?

I need to learn how to use random number generation.

Key Terms

Random Generate Function

Coding activities

1. Write a simple python program to generate a random number between 1 and 10 and OUTPUT the result. (use lesson notes to help)

2. Write a python program to roll two dice and OUTPUT both of the dice values and the total value.

3. Write a python program to toss a coin and OUTPUT if it is heads or tails.
3 a. Get the user to enter a number and then toss the coin that number of times. OUTPUT the results

Extension: Create a game that uses random number generation.

Learning Outcomes

I can copy code to create a random number.

I can use random number generation in python in a program of my own.

I can use random number generation in python to solve a problem.