import random as r
import easygui as e
while True:
lis=['1','2','3','4','5','6','7','8','9']
caipiao=r.sample(lis,5)
caipiao=''.join(caipiao)
answer=e.enterbox("5位数字:")
sum=0
if caipiao==answer:
sum+=10000
e.msgbox("彩票号:%s 奖金:%d元" %(caipiao,sum)
else:
for i in caipiao:
if i in answer:
sum+=1000
e.msgbox(f"彩票号:{caipiao}")
e.msgbox(f'奖金:{sum}元')
e.msgbox('感谢使用')