A collection of computational techniques to approximate a solution.
The computations use random samples to help approximate an unknown solution.
Random numbers can be generated in multiple different ways by importing various python modules. Let's recall just a few using import random, import numpy, and import math.
IMPORT NUMPY - has a powerful suite of random number generators that are widely used in scientific computing.
Step 1. Run the Code As-Is making note of the various commands.
Step 2. Alter the code to generate a random integer ranging from 0 to 5000.
IMPORT RANDOM
Step 1. Run the Code As-Is making note of the various commands.
Step 2. Alter the code to set 5 different numbers that you enter for the choice list.
Step 3. Record what number it chose.
Step 4. Re-run the code again for a new random number to be chosen. Was it the same or different than the number chosen in Step 3.
COMBINATION - IMPORT RANDOM & IMPORT MATH
Step 1. Run the Code As-Is making note of the various commands.
Step 2. Alter the angle to range from 0 to 180.