Random

We can create random numbers in Python in a number of ways. If we want a range of number between 0 and another number e.g. 10 we can use randrange

We can also use randint(x,y) to get a random int between x and y.

We can also make a random choice from a given list e.g.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.