aboutsummaryrefslogtreecommitdiffstats
path: root/noetic-llama/src/ollamawrapper/src/capabilities/basicmaths.py
diff options
context:
space:
mode:
Diffstat (limited to 'noetic-llama/src/ollamawrapper/src/capabilities/basicmaths.py')
-rw-r--r--noetic-llama/src/ollamawrapper/src/capabilities/basicmaths.py47
1 files changed, 45 insertions, 2 deletions
diff --git a/noetic-llama/src/ollamawrapper/src/capabilities/basicmaths.py b/noetic-llama/src/ollamawrapper/src/capabilities/basicmaths.py
index e2491e0..ebad59c 100644
--- a/noetic-llama/src/ollamawrapper/src/capabilities/basicmaths.py
+++ b/noetic-llama/src/ollamawrapper/src/capabilities/basicmaths.py
@@ -1,5 +1,7 @@
+import rospy
-def add(num1=1, num2=2):
+
+def add(num1, num2):
"""Returns the output of two numbers added together
Args:
@@ -9,4 +11,45 @@ def add(num1=1, num2=2):
Returns:
int: The sum of the two numbers
"""
- print("%f + %f = %f" % (num1, num2, num1 + num2)) \ No newline at end of file
+ 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()"""