Python Program to Built-in modules

Python has several built-in modules that come with the Python installation. Here is an example program that demonstrates the use of some of these built-in modules :
Program :
# Importing built-in modules
import math
import random
import datetime

# Using the math module
print("The value of pi is:", math.pi)
print("The square root of 16 is:", math.sqrt(16))

# Using the random module
print("A random number between 1 and 10 is:", random.randint(1, 10))

# Using the datetime module
current_time = datetime.datetime.now()
print("The current date and time is:", current_time)
Output :
The value of pi is: 3.141592653589793
The square root of 16 is: 4.0
A random number between 1 and 10 is: 2
The current date and time is: 2023-04-27 12:49:06.052073
In this example, we import three built-in modules : `math`, `random`, and `datetime`.

We then use various functions and constants from these modules to perform tasks like calculating the value of pi, generating a random number, and getting the current date and time.