Browse Source

Update 'calculator.py'

master
depp 3 years ago
parent
commit
7fd1ee8b48
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      calculator.py

+ 6
- 0
calculator.py View File

@@ -9,6 +9,9 @@ def mod(x,y):
def div(x,y):
return x / y

def mult(x,y):
return x * y

def main():
x = int(input("Input x: "))
y = int(input("Input y: "))
@@ -20,6 +23,9 @@ def main():
# sub(x, y) returns x - y

# mult(x, y) returns x * y
multiply = mult(x,y)
print(multiply)
modulus = mod(x,y)
print(modulus)
# mod(x, y) returns x % y


Loading…
Cancel
Save