Commit d4a7acae by BellCodeEditor

auto save

parent 370cf254
Showing with 44 additions and 1 deletions
......@@ -3,6 +3,6 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正
# 请用input()实现用户输入账号、密码的功能
ninxianzaiy
# 如果用户输入的账号、密码正确,提示登陆成功
\ No newline at end of file
print("欢迎来到21点!")
import random
_shu_=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]
_huoqu_=random.choice(_shu_)
_huoqu2_=random.choice(_shu_)
print("随机选取点数:" )
print(_huoqu_)
print("现在拥有点数:")
_gg2_=0
_gg2_=_gg2_+_huoqu2_
_gg_=0#刚刚拥有点数
_gg_=_gg_+_huoqu_
print(_gg_)
print("庄家现有点数:")
print(_gg2_)
_aj_=0
_aj_=input("按“0”提交,或按其他任意键继续。")
while True :
if _aj_=="0":
_huoqu_=random.choice(_shu_)
_huoqu2_=random.choice(_shu_)
print("随机选取点数:" )
print(_huoqu_)
print("现在拥有点数:")
_gg2_=0
_gg2_=_gg2_+_huoqu2_
_gg_=0#刚刚拥有点数
_gg_=_gg_+_huoqu_
print(_gg_)
print("庄家现有点数:")
print(_gg2_)
_aj_=input("按“0”提交,或按其他任意键继续。")
else:
if _gg_==_gg2_:
print("平局")
break
elif _gg_<_gg2_:
print("你输了")
break
else:
print("你赢了")
break
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