Commit f398b28c by BellCodeEditor

save project

parent 498a7751
Showing with 19 additions and 15 deletions
import turtle
pen=turtle.Pen()
i=2
a=input("请出拳(石头、剪刀、布):") userpassword="123456"
print("玩家出"+a) username="python"
import random while True:
b=["石头","剪刀","布"] if i>0:
c=random.choice(b) name=input("请输入用户名:")
print("计算机出拳"+c) password=input("请输入密码:")
if a==c: i-=1
print("平局") if name==username and password==userpassword:
elif (a=="石头" and c=="剪刀") or (a=="布" and c=="石头") or (a=="剪刀" and c=="布"): print("登录成功")
print("你赢了") if name !=username:
else: print("用户名错误,请重试")
print("电脑赢了") continue
if password !=serpassword:
print("密码错误,请重试")
else:
print("输入错误2次,你已被锁定")
exit()
print("欢迎来到此地")
......
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