Commit c47bd709 by BellCodeEditor

save project

parent 36b47055
Showing with 27 additions and 6 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~ # 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6} Chinese=float(input("语文:"))
k=input('请问您想买什么商品?') Math=float(input("数学:"))
if k in dict: English=float(input("英语:"))
print('您购买的商品'+'有货,并支付'+k+str(dict[k])+'元') score=Chinese+Math+English
print(score)
if score>=270:
print("优秀")
elif score<=270 and score>=240:
print("良好")
elif score<240 and score>=180:
print("合格")
else: else:
print('您购买的商品缺货,敬请期待') print("不合格")
\ No newline at end of file
import random
lis=['0','1','2','3','4','5','6','7','8','9']
caipiao=random.sample(lis,5)
caipiao="".join(caipiao)
mai=input("请输入号码:")
if mai==caipiao:
print("中奖10000元")
else:
i=0
for k in mai:
for v in caipiao:
if k==v:
i+=1
print("彩票号:"+caipiao)
print("奖金:"+str(i*1000)+"元")
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