blob: ebad59cc5898977b295189027e9fbc99bd0a2fa4 (
plain)
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
52
53
54
55
|
import rospy
def add(num1, num2):
"""Returns the output of two numbers added together
Args:
num1 (int): The first number to add together
num2 (int): The second number to add together
Returns:
int: The sum of the two numbers
"""
print("%f + %f = %f" % (num1, num2, num1 + num2))
return num1 + num2
def sub(num1, num2):
"""Returns the output of two numbers subtracted from each other
Args:
num1 (int): The first number
num2 (int): A number to subtract the first number from
"""
print("%f - %f = %f" % (num1, num2, num1 - num2))
return num1 - num2
def mult(num1, num2):
"""Returns the output of two numbers multiplied with each other
Args:
num1 (int): The first number to multiply together
num2 (int): The second number to multiply together
"""
print("%f × %f = %f" % (num1, num2, num1 * num2))
return num1 * num2
def div(num1, num2):
"""Returns the output of two numbers divided with each other
Args:
num1 (int): The enumerator
num2 (int): The denominator
"""
print("%f ÷ %f = %f" % (num1, num2, num1 / num2))
return num1 / num2
"""class A:
def funct():
a = A()
def func():
a.funct()"""
|