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

bellcode / lesson8-2

  • 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
Switch branch/tag
  • lesson8-2
  • diy10086.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 288ec28b
    BellCodeEditor committed a year ago
    288ec28b
diy10086.py 182 Bytes
1 2 3 4 5 6 7 8
x = {"a":3,"b":7,'c':5}
k = input("你要买什么呀")
if k in x:
    y = int(input("要几个"))
    i = x[k]*y
    print("总共"+str(i)+"元")
else:
    print("缺货了")