Commit 0c175f1a by BellCodeEditor

auto save

parent 9ed85b40
Showing with 13 additions and 4 deletions
import turtle
for i in range(5):
turtle.seth(-15)
turtle.left(i*30)
turtle.circle(80,90)
turtle.left(90)
turtle.circle(80,90)
turtle.done()
\ No newline at end of file
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
j=input("你要买什么?")
k=int(input("买几个:"))
if j in dict:
prink('巧克力'(dict[j]))
print("你买的%s,单价是%s元,你要买%s个,总价是:%s元"%(j,dict[j],k,dict[j]*k))
else:
prink()
\ No newline at end of file
print("无此商品")
\ 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