math library
Simple addition, subtraction, multiplication and division can be used directly, but when you want to use the operation of taking the absolute value of the square root, you need to introduce python's mathematical function library
import math
import math
a = 5
print(math.sqrt(a))
random number
import random
i = 1
while(i < 5):
i = i+1
print("the random function")
print(random.random())#random函数随机产生0-1的任意实数
print("the uniform function")
print(random.uniform(1, 5))#uniform函数随机产生自定义范围内的函数