# leensa邀请码
https://leensc.com/#/register?code=XGn78xbM
https://leensc.com/#/register?code=TKhSrP4k
https://leensc.com/#/register?code=xReWkJi2
# leensa邀请码
# 定义函数来执行加法
def add(x, y):
return x + y
# 定义函数来执行减法
def subtract(x, y):
return x - y
# 定义函数来执行乘法
def multiply(x, y):
return x * y
# 定义函数来执行除法
def divide(x, y):
if y == 0:
return "Error: Division by zero!"
else:
return x / y
# 打印欢迎消息
print("欢迎使用简单计算器!")
print("选择你要执行的操作:")
print("1. 加法")
print("2. 减法")
print("3. 乘法")
print("4. 除法")
# 获取用户输入
choice = input("输入你的选择(1/2/3/4): ")
标签:code,return,register,leensa,邀请,https,print,def
From: https://blog.csdn.net/2405_85664382/article/details/141159764