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.

About CDB 362 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


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