In this lesson we are going to introduce Show
In order to use the random number generator, you need to import the
Then you can call the
Run the code a few times, and you'll get a few random numbers like these:
Random integersThe
Here are some examples, including application with CodeCraft.
Check
out the image, the blue columns have random heights from 10 to 20, and are located at Run the program a few times, and you'll notice that the blue columns change heights between 10 and 20 every time. The lime green columns have varying odd number heights between 1 and 9. Functions for sequences The
Let's try the following examples:
|