diff --git a/54188.py b/54188.py new file mode 100644 index 0000000..0f1e688 --- /dev/null +++ b/54188.py @@ -0,0 +1,3 @@ +import func: +data=func.input() +score = fun \ No newline at end of file diff --git a/func.py b/func.py index 20cdcc0..5b6ee27 100644 --- a/func.py +++ b/func.py @@ -1,6 +1,29 @@ -def - +def new_jnput(): + total = [] + while True: + unit= input('请输入单价(q退出):') + if unit=='q': + break + else: + try: + unit= int(unit) + except: + print('请重新输入一个数字') + else: + total.append(unit) + finally: + print('-'*30) + return total +resurt=new_jnput() +print(result) +def sum(money) + p=0 + for i in money: + p=p+i + return p +con=sum(total) +print(str(sum))