Commit 3f0467a8 by BellCodeEditor

save project

parent ef431809
Showing with 7 additions and 21 deletions
...@@ -34,14 +34,4 @@ def sum(money): ...@@ -34,14 +34,4 @@ def sum(money):
# 设置变量count # 设置变量count
count=0 count=0
# 遍历列表 # 遍历列表
for i in money:
# 计算总价 \ No newline at end of file
count=count+i
# 返回总数count
return count
price = new_input()
# 调用函数sum并赋值给pay
print("您一共消费了" + str(pay) + "元!扫码还是现金呢?")
\ No newline at end of file
# 勇于挑战的创造师,下面的代码犯了两类典型错误,请你把bug揪出来吧。 import s
area = ['盘丝洞','白骨洞','大雁塔'] b=s.new_inpot()
monster = {'盘丝洞':'蜘蛛精','白骨洞': '白骨精','大雁塔':'花妖'} a=s.sums(b)
# 打印出大雁塔 print(a)
print(area[3]) \ No newline at end of file
# 向字典中添加 '地府':'僵尸'
monster.append('地府','僵尸')
print(monster)
\ 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