In Python 3.10, you can use the math.max() and math.min() functions to get the maximum and minimum of two numbers. Here are some examples:
import math
# Example 1: Find the maximum of two numbers
num1 = 10
num2 = 20
max_num = math.max(num1, num2)
print(max_num) # Output: 20
# Example 2: Find the minimum of two numbers
num1 = 30
num2 = 15
min_num = math.min(num1, num2)
print(min_num) # Output: 15
# Example 3: Find the maximum of two floating-point numbers
num1 = 3.1415
num2 = 2.7182
max_num = math.max(num1, num2)
print(max_num) # Output: 3.1415
As you can see from these examples, the math.max() and math.min() functions can be used with both integers and floating-point numbers to find the maximum and minimum of two numbers.