Skip to content

Commit 084da6f

Browse files
committed
add functions to calculator
1 parent cede375 commit 084da6f

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

calculator.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ def divide(a,b):
1111
return a/b
1212

1313

14-
print("I'm going use the calculator functions to multiply 5 and 6")
15-
x = multiply(5,6)
16-
print(x)
14+
15+
def square(a):
16+
return a * a
17+
18+
19+
def cube(a):
20+
return a * a * a
21+
22+
23+
if __name__ == "__main__":
24+
print("I'm going to use the calculator functions to multiply 5 and 6")
25+
x = multiply(5, 6)
26+
print(x)

0 commit comments

Comments
 (0)