GCSE COMPUTER SCIENCE Practical Programming using Python Lesson 8 – Random Random The random function allows you to use random numbers. Below are three ways of using the random function. Activity 1 Write the following Python program and press F5 to run. Create a program to out a random number between the values of 1 and 500. Place a screenshot of your code here Save the program as random1. Activity 2 Write the following Python program and press F5 to run. Create a program to out a random number between two value of your choice. Place a screenshot of your code here Save the program as random2. Activity 3 Write the following Python program and press F5 to run. Create a program to allow the computer to randomly output rock, paper or scissors. Place a screenshot of your code here NOTE: Once this is done it should be easy to create the rest of the game, it is just a series of If statements. Save the program as random3.
© Copyright 2024 Paperzz