浏览代码

Merge branch 'master' of branch/calculator into master

master
mctastic 3 年前
committed by Gitea
父节点
当前提交
9a2378fc45
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. +7
    -0
      calculator.py

+ 7
- 0
calculator.py 查看文件

@@ -12,6 +12,10 @@ def div(x,y):
def mult(x,y):
return x * y

def sub(x, y):
return x - y


def main():
x = int(input("Input x: "))
y = int(input("Input y: "))
@@ -20,7 +24,10 @@ def main():
addition = add(x, y)
print(addition)

# sub(x, y) returns x - y
subtraction = sub(x, y)
print(subtraction)

# mult(x, y) returns x * y
multiply = mult(x,y)


正在加载...
取消
保存