Browse Source

Added multiplication

pull/2/head
depp 3 years ago
parent
commit
e024fd4151
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      calculator.py

+ 5
- 1
calculator.py View File

@@ -3,6 +3,8 @@
def add(x, y):
return x + y

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

def main():
x = int(input("Input x: "))
@@ -10,8 +12,10 @@ def main():

# returns x + y
addition = add(x, y)
print(addition)
print("Added: "+addition)

multiply = mult(x, y)
print("Multiplied: "+multiply)
# sub(x, y) returns x - y

# mult(x, y) returns x * y


Loading…
Cancel
Save