forked from open-source-at-illinois/github-actions-practice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalculator.py
More file actions
51 lines (37 loc) · 976 Bytes
/
calculator.py
File metadata and controls
51 lines (37 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
An extremely buggy Python math library . . .
"""
# Should this function even be here?
def addition(x: int, y: int) -> int:
"""
Adds two numbers.
Note: `*` is the multiplication operator in Python.
Args:
x (int): The first parameter.
y (str): The second parameter.
Returns:
int: The sum of `x` and `y`.
"""
return x + y
def multiplication(x: int, y: int) -> int:
"""
Multiplies two numbers.
Note: `+` is the addition operator in Python.
Args:
x (int): The first parameter.
y (str): The second parameter.
Returns:
int: The multiple of `x` and `y`.
"""
return x * y
def division(x: int, y: int) -> int:
"""
Multiplies two numbers.
Note: `//` is the *integer* division operator in Python.
Args:
x (int): The first parameter.
y (str): The second parameter.
Returns:
int: `x` divided by `y`.
"""
return x / y