Module 3 - Section 2 - Lists

3.2.6 - Random extended

Also there is a way to pick a random item out of a list. Copy the following code to Thonny and save it as rock_paper_scissors.py :


All of the prior code generates integer numbers. If a floating point number is desired, a programmer should use the random method.

The code below generates a random number from 0 to 1

import random my_number = random.random()


and the following code creates a random number between 10 and 45

import random my_number = random.random() * 35 + 10


Can you create a code that generates a random number between 27 and 42?