# Function to find the Least Common Multiple (LCM) of two numbers
def lcm(a, b):
# Start with the greater of the two numbers
lmc = max(a, b)
# Loop indefinitely until we find the LCM
while True:
# If `lmc` is divisible by both numbers, it is the LCM
if lmc % a == 0 and lmc % b == 0:
return lmc # Return the LCM
lmc += 1 # Increment and check the next number
# Variable to store the LCM of numbers from 1 to 10
result = 1
# Iterate through numbers 1 to 10
for i in range(1, 11):
result = lcm(result, i) # Update `result` with LCM of current range
# Output the final LCM of numbers from 1 to 10
print("The largest palindrome made from the product of two 2-digit numbers is:", result)
'''
run:
The largest palindrome made from the product of two 2-digit numbers is: 2520
'''