Commit 9befb518 by BellCodeEditor

save project

parent 12b701ea
Showing with 5 additions and 3 deletions
...@@ -6,7 +6,8 @@ def suan_zhang(): ...@@ -6,7 +6,8 @@ def suan_zhang():
break break
else: else:
try: try:
int(input("阿达萨达")) unit=int(unit)
print("-"*30)
except: except:
print("要输入整数哟") print("要输入整数哟")
else: else:
...@@ -18,4 +19,5 @@ def sum(m): ...@@ -18,4 +19,5 @@ def sum(m):
count=count+i count=count+i
return count return count
a=suan_zhang() a=suan_zhang()
b=sum(a) b=sum(a)
\ No newline at end of file print("您一共消费"+str(b)+"元。")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment