def find_smallest_number(num1, num2):
if num1 < num2:
return num1
elif num2 < num1:
return num2
else:
return "Both numbers are equal"
# Example
number1 = 5
number2 = 7
result = find_smallest_number(number1, number2)
print(f"The smallest number between {number1} and {number2} is: {result}")
python复制成功复制代码