awa
This commit is contained in:
parent
7acfbf7a17
commit
f62dccea4f
23
libs/P_C.py
23
libs/P_C.py
@ -27,13 +27,23 @@ def P_C_M(A, B): # stand for Physics Calculation multiple
|
|||||||
Unit2 = []
|
Unit2 = []
|
||||||
for unit in B[3]:
|
for unit in B[3]:
|
||||||
if unit in [Unit1]:
|
if unit in [Unit1]:
|
||||||
n = Unit1.index(unit)
|
Unit1.remove(unit)
|
||||||
Unit1.pop(n)
|
|
||||||
else:
|
else:
|
||||||
Unit2.append(unit)
|
Unit2.append(unit)
|
||||||
if Unit1 == None:
|
if Unit1 == None:
|
||||||
Unit1 = []
|
Unit1 = []
|
||||||
|
print(Unit1, Unit2)
|
||||||
|
for unit in Unit2:
|
||||||
|
print(unit)
|
||||||
|
if unit in Unit1:
|
||||||
|
Unit1.remove(unit)
|
||||||
|
Unit2.remove(unit)
|
||||||
|
print(unit)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
print(Unit1, Unit2)
|
||||||
C = [Float, Int, Unit1, Unit2]
|
C = [Float, Int, Unit1, Unit2]
|
||||||
|
print(C)
|
||||||
return C
|
return C
|
||||||
|
|
||||||
|
|
||||||
@ -57,11 +67,16 @@ def P_C_D(A, B): # stand for Physics Calculation divide
|
|||||||
Unit2 = []
|
Unit2 = []
|
||||||
for unit in B[2]:
|
for unit in B[2]:
|
||||||
if unit in [Unit1]:
|
if unit in [Unit1]:
|
||||||
n = Unit1.index(unit)
|
Unit1.remove(unit)
|
||||||
Unit1.pop(n)
|
|
||||||
else:
|
else:
|
||||||
Unit2.append(unit)
|
Unit2.append(unit)
|
||||||
if Unit1 == None:
|
if Unit1 == None:
|
||||||
Unit1 = []
|
Unit1 = []
|
||||||
|
for unit in Unit2:
|
||||||
|
if unit in Unit1:
|
||||||
|
Unit1.remove(unit)
|
||||||
|
Unit2.remove(unit)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
C = [Float, Int, Unit1, Unit2]
|
C = [Float, Int, Unit1, Unit2]
|
||||||
return C
|
return C
|
||||||
|
Loading…
Reference in New Issue
Block a user