Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson11_4

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit f45a3c8f authored 3 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent dc70412a
Show whitespace changes
Inline Side-by-side
Showing with 54 additions and 0 deletions
  • __pycache__/f.cpython-37.pyc
  • f.py
  • func.py
  • s.py
__pycache__/f.cpython-37.pyc 0 → 100644
View file @ f45a3c8f
File added
This diff is collapsed. Click to expand it.
f.py 0 → 100644
View file @ f45a3c8f
bl={"红烧肉":1688, "糖醋里脊":168, "西红柿鸡蛋":998, "螺狮粉":888, "鲱鱼罐头":1968}
def 求总价():
while True:
x=input("你想要什么菜?")
if x in bl:
y=input("第二个菜?")
if y in bl :
z=input("第三个菜?")
if z in bl:
xyz=bl[x]+bl[y]+bl[z]
print("你需要支付"+str(xyz)+"元")
else:
print("木有这道菜。")
else:
print("木有这道菜。")
else:
print("木有这道菜。")
求总价()
This diff is collapsed. Click to expand it.
func.py 0 → 100644
View file @ f45a3c8f
def h():
a=[]
while True:
b=input("?")
if b=="a":
break
else:
try:
b=int(b)
except:
print("请重新输入一个数字。")
else:
a.append(b)
print("-"*30)
return a
r=h()
print(r)
\ No newline at end of file
This diff is collapsed. Click to expand it.
s.py 0 → 100644
View file @ f45a3c8f
import f
求总价()
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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