An example of this can be found on my WSQ06, here’s the part of the code where i imported a module:
import random #i imported the module random that in this case it produces a random intenger from a certain parameter
value= random.randint(1,100) #What this line does is that the variable value will become a random integer (random.randint) from 1 to 100 (1,100)
print(value)
This program will show a random value from 1 to 100.
—
Another example is:
import math #this import the module math which has lots of functions that can be found here https:/
pi=math.pi #pi will take math.pi’s value which is equivalent to 3.1416…
print (pi)
This program will show:
3.141592653589793