cal_func.py
478 字节
# @Time :2020/10/22 9:43
# @Author :dengyuting
# @File :cal_func.py
# 计算产品总价
def cal_orderPrice(univalence, *args):
sum = 0
for num in args:
sum = sum + univalence * num
return sum
def cal_Ratio(ratio, univalence, *args):
price = cal_orderPrice(univalence, *args)
sum = ratio/100 * price
return sum
def add(x, y):
"""
对两个数相加
:param x:
:param y:
:return:
"""
return int(int(x)+y)