This commit is contained in:
沈瑗杰 2020-12-21 21:59:36 +08:00
parent 5766a18fd4
commit 8090dd2fcf

View File

@ -13,6 +13,17 @@ def P_C_M(A, B): # stand for Physics Calculation multiple
A & B list format:docs.basic_config.json:basic_number A & B list format:docs.basic_config.json:basic_number
""" """
C = [0.0, 1, [], []] C = [0.0, 1, [], []]
Float = A[0] * B[0]
Int = A[1] + B[1]
Unit1 = A[2].extend(B[2])
Unit2 = []
for unit in B[3]:
if unit in Unit1:
n = Unit1.index(unit)
Unit1.pop(n)
else:
Unit2.append(unit)
C = [Float, Int, Unit1, Unit2]
return C return C