ss-mathkit-1234 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.3
2
+ Name: ss-mathkit-1234
3
+ Version: 0.1.0
4
+ Summary: Add your description here
5
+ Author: 23f2000220
6
+ Author-email: 23f2000220 <23f2000220@ds.study.iitm.ac.in>
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+
File without changes
@@ -0,0 +1,17 @@
1
+ [project]
2
+ name = "ss-mathkit-1234"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ authors = [
7
+ { name = "23f2000220", email = "23f2000220@ds.study.iitm.ac.in" }
8
+ ]
9
+ requires-python = ">=3.11"
10
+ dependencies = []
11
+
12
+ [project.scripts]
13
+ ss-mathkit-1234 = "ss_mathkit_1234:main"
14
+
15
+ [build-system]
16
+ requires = ["uv_build>=0.11.19,<0.12.0"]
17
+ build-backend = "uv_build"
@@ -0,0 +1,37 @@
1
+ import argparse
2
+
3
+
4
+ def add(*numbers):
5
+ # print(numbers, type(numbers)) #(24, 2525, 35, 477, 7464, 343) <class 'tuple'>
6
+ my_sum = sum(numbers)
7
+ return my_sum
8
+
9
+
10
+ def multiply(*numbers):
11
+ ans = 1
12
+ for num in numbers:
13
+ ans*= num
14
+ return ans
15
+
16
+ # x = add(24,2525,35,477,7464,343)
17
+ # print(x) #None
18
+
19
+ # y = multiply(24,2454,35,65,8643,47)
20
+ # print(y)
21
+
22
+
23
+ def main():
24
+ parser = argparse.ArgumentParser()
25
+ parser.add_argument("operation",choices = ["add","multiply"])
26
+ parser.add_argument("numbers",nargs="+",type=float)
27
+
28
+ my_args = parser.parse_args()
29
+ # print(my_args)
30
+
31
+ if my_args.operation == "add":
32
+ result = add(*my_args.numbers)
33
+ elif my_args.operation == "multiply":
34
+ result = multiply(*my_args.numbers)
35
+ return result
36
+
37
+ # print(main())