We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cb07eeb + 2cf3e23 commit 0ed7bb3Copy full SHA for 0ed7bb3
1 file changed
calculator.py
@@ -10,6 +10,19 @@ def subtract(a,b):
10
def divide(a,b):
11
return a/b
12
13
+def square(a):
14
+ return a*a
15
+
16
+def cube(a):
17
+ return a*a*a
18
19
+def square_n_times(number, n):
20
+ total = 0
21
+ for _ in range(n):
22
+ number = square(number)
23
+ total += number
24
+ return total
25
26
print("I'm going use the calculator functions to multiply 10 and 2")
27
c=multiply(10,2)
28
print(c)
0 commit comments