If we want to change the random value range from 0 and 1 to something else, we can multiply. So in our blackjack game, if we want to generate a random number between 1 and 52, we can multiply by 52…
A random number multiplied by 52...
Another random number multiplied by 52...
There may be an issue, however. The random function returns decimal places. There are times when you simply want a whole number. Thankfully, the math object comes with a function to handle that.
A random number with no decimal place...
Another random number with no decimal place...