We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85cc5bc commit c9ff050Copy full SHA for c9ff050
Multiply.py
@@ -1,4 +1,7 @@
1
def product(a, b):
2
+ if b < 0:
3
+ return -product(a, -b)
4
+
5
if a < b:
6
return product(b, a)
7
elif b != 0:
@@ -9,4 +12,4 @@ def product(a, b):
9
12
10
13
a = int(input("Enter first number: "))
11
14
b = int(input("Enter second number: "))
-print("Product is: ", product(a, b))
15
+print("Product is:", product(a, b))
0 commit comments