wtjj 0.1.0__py3-none-any.whl

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.
wtjj/__init__.py ADDED
@@ -0,0 +1,7 @@
1
+ from .core import (
2
+ add, sub, mul, div,
3
+ iq, dice,
4
+ evens, odds,
5
+ tris, tri,
6
+ window
7
+ )
wtjj/core.py ADDED
@@ -0,0 +1,47 @@
1
+ import math
2
+ import tkinter as tk
3
+ import random
4
+ def add(*args):
5
+ return sum(args)
6
+ def sub(sa,sb):
7
+ return sa - sb
8
+ def iq(u=None):
9
+ if u is None:
10
+ return random.randint(40,80)
11
+ else:
12
+ return random.randint(100,140)
13
+ def mul(*args):
14
+ if not args:
15
+ return 1
16
+ return math.prod(args)
17
+ def div(da,db):
18
+ return da / db
19
+ def window(color = 'black'):
20
+ root = tk.Tk()
21
+ root.geometry("800x800")
22
+ root.title("window")
23
+ root.configure(bg=color)
24
+ root.mainloop()
25
+ def dice(a=1,b=6):
26
+ return random.randint(a,b)
27
+ def evens(a=1,b=10):
28
+ b = b + 1
29
+ even = []
30
+ for i in range(a,b):
31
+ if i % 2 == 0:
32
+ even.append(i)
33
+ return even
34
+ def odds(a=1,b=10):
35
+ b = b + 1
36
+ odd = []
37
+ for i in range(a,b):
38
+ if i % 2 != 0:
39
+ odd.append(i)
40
+ return odd
41
+ def tris(a=1,b=10):
42
+ triangular = []
43
+ for i in range(a,b + 1):
44
+ triangular.append(i * (i + 1) // 2)
45
+ return triangular
46
+ def tri(n=1):
47
+ return n * (n + 1) // 2
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: wtjj
3
+ Version: 0.1.0
4
+ Summary: 一个实用的Python工具库
5
+ Requires-Python: >=3.8
@@ -0,0 +1,6 @@
1
+ wtjj/__init__.py,sha256=wqnvzFO80g4pJD6pXLLFdH_dliqK-t3tc5MqNSiWmI4,110
2
+ wtjj/core.py,sha256=OlUOLqhWiU7UYtskiXP9RxC0sFJuvt43WrvUYB8Ijns,1050
3
+ wtjj-0.1.0.dist-info/METADATA,sha256=jDxchtX2wgupFxQelt8Czp2UZMm0BcW7ItjU8oBUEvQ,116
4
+ wtjj-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
5
+ wtjj-0.1.0.dist-info/top_level.txt,sha256=TccpGYbjk_Us3dYGugdjWJP0iVseEu-UiJSky3md6Kw,5
6
+ wtjj-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ wtjj