soperator 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.
soperator-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: soperator
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Scratch Operator
|
|
5
|
+
Author: 4RK4N
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
An Operator from Scratch Platform, but in Python
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install SOperator
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import random
|
|
2
|
+
import math
|
|
3
|
+
import operator
|
|
4
|
+
|
|
5
|
+
class SOperator:
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def Add(int1:int, int2:int):return int(int1 + int2)
|
|
9
|
+
def Sub(int1:int, int2:int):return int(int1 - int2)
|
|
10
|
+
def Mul(int1:int, int2:int):return int(int1 * int2)
|
|
11
|
+
def Div(int1:int, int2:int):return int(int1 / int2)
|
|
12
|
+
|
|
13
|
+
def PickRandom(int1:int, int2:int):return random.randint(int1, int2)
|
|
14
|
+
|
|
15
|
+
def HigherThan(int1:int, int2:int):return int1 > int2
|
|
16
|
+
def LowerThan(int1:int, int2:int):return int1 < int2
|
|
17
|
+
def Equal(any1:any, any2:any):return any1 == any2
|
|
18
|
+
|
|
19
|
+
def And(bool1:bool, bool2:bool):return bool1 and bool2
|
|
20
|
+
def Or(bool1:bool, bool2:bool):return bool1 or bool2
|
|
21
|
+
def Not(bool:bool):return not(bool)
|
|
22
|
+
|
|
23
|
+
def Join(any1:any, any2:any):return f"{any1}{any2}"
|
|
24
|
+
def Letter_Of(int:int, any:any):return any[int-1]
|
|
25
|
+
def LenghtOf(any:any):return len(any)
|
|
26
|
+
def Contains(any1:any, any2:any):
|
|
27
|
+
return any2 in any1
|
|
28
|
+
|
|
29
|
+
def Mod(int1:int, int2:int):return int1 % int2
|
|
30
|
+
def Round(float:float):
|
|
31
|
+
if float >= int(float)+0.5:return int(float)+1
|
|
32
|
+
else: return int(float)
|
|
33
|
+
|
|
34
|
+
class Type:
|
|
35
|
+
def Abs(float:float):abs(float)
|
|
36
|
+
def Floor(float:float):int(float)
|
|
37
|
+
def Ceiling(float:float):
|
|
38
|
+
if float > int(float):return int(float)+1
|
|
39
|
+
else: return int(float)
|
|
40
|
+
def Sqrt(float:float):return float ** 0.5
|
|
41
|
+
def Sin(float:float):return math.sin(math.radians(float))
|
|
42
|
+
def Cos(float:float):return math.cos(math.radians(float))
|
|
43
|
+
def Tan(float:float):return math.tan(math.radians(float))
|
|
44
|
+
def Asin(float:float):return math.degrees(math.asin(float))
|
|
45
|
+
def Acos(float:float):return math.degrees(math.acos(float))
|
|
46
|
+
def Atan(float:float):return math.degrees(math.atan(float))
|
|
47
|
+
def Ln(float:float):return math.log(float)
|
|
48
|
+
def Log(float:float):return math.log(float, 10)
|
|
49
|
+
def EulerPow(float:float):return math.e ** float
|
|
50
|
+
def TenPow(float:float):return 10 ** float
|
|
51
|
+
|
|
52
|
+
print(SOperator.Mod(-3, -10))
|