def print_content(content): print(content) def get_sentence_constituent(sentence,constituent): return input("请输入%s的%s:" % (sentence,constituent)) def get_commodity_price(): return float(input("请输入商品单价:")) def get_commodity_quantity(): return float(input("请输入购买数量:")) def get_payment_amount(): return float(input("请输入支付金额:")) def get_number_people(content): return int(input("请输入%s:" % content)) def calculate_cure_ratio(conform,cure): return cure / conform * 100 def get_weight(content): return int(input("请输入%s:" % content)) def calculate_weight(weight): jin = weight // 16 liang = weight % 16 return jin,liang
标签:return,定义,weight,get,python,练习,content,input,def From: https://www.cnblogs.com/xmgcool/p/16967016.html