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

bellcode / lesson8-5

  • 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 3feccb0d authored 4 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent f0cc1948
Hide whitespace changes
Inline Side-by-side
Showing with 14 additions and 0 deletions
  • 1.py
1.py 0 → 100644
View file @ 3feccb0d
dict = {"苹果":2,"梨子":3,"香蕉":5,"甘蔗":6}
k = input("请输入水果名称:")
v = input("请输入该水果价格:")
if k in dict:
if int(v) > dict[k]:
dict[k] = int(v)
print(f"亲爱的{k}同学你好,您的分数{v}已经刷新成功!")
else:
print(f"亲爱的{k}同学你好,您的最高分数{dict[k]}已经保留!")
else:
dict[k] = int(v)
print(f"亲爱的{k}同学你好,已经为您创建新的成绩单!")
print(dict)
\ 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