## Generating random numbers in Python

#### Generating random numbers in Python

Problem:Explain how to generate random numbers in Python. Describe the use of the random module, including functions for generating random integers, floating-point numbers, and selecting random items from a sequence. Provide examples to illustrate the usage of random number generation in Python programming.

Solution: Generating Random Numbers in Python: Python provides the random module, which offers various functions for generating random numbers and performing random operations. This module is often used for tasks such as generating random values for simulations, games, statistical analysis, and more.

##### Generating Random Integers:
```import random
# Generate a random integer between 1 and 6 (inclusive)
dice_roll = random.randint (l, 6)
print (dice_roll)
```

##### Generating Random Floating-Point Numbers:
```import random
# Generate a random floating-point number between 0 and 1
random_float = random.uniform (0 , 1)
print (random_float)
```

##### Selecting Random Items from a Sequence:
```import random
my_list = [ " apple" , " banana" , " cherry" , " date" ]

# Select a random item from the list
random_fruit = random.choice(my_list)
print(random_fruit)
```