Commit 0e206bc6 by BellCodeEditor

save project

parent 1cada8c0
Showing with 20 additions and 45 deletions
import turtle un = "cao"
h=turtle.Screen() ud = "bowen"
h.bgcolor("yellow") n = input("用户名")
c=h.textinput("提示", "你想要多大的爱心呀?") p = input("密码")
b=int(c) \ No newline at end of file
p=turtle.Pen()
p.up()
p.goto(100,100)
p.down
p.write("你被多米尼加蒂芬用M1A1卡宾枪击杀了",font=("楷体",10,"normal"))
p.hideturtle()
w=turtle.Pen()
w.pencolor("blue")
w.pensize(10)
w.left(45)
w.forward(2*b)
w.circle(b,180)
w.right(90)
w.circle(b,180)
w.forward(2*b)
w.hideturtle()
turtle.done()
\ No newline at end of file
un = cao username = "cao"
ud = bowen userpassword = "bowen"
n = input("用户名") while True:
p = input("密码") name = input("请输入用户名:")
if n == un and p == ud password = input("请输入密码:")
print("登陆成功,开始游戏") if name == username and password == userpassword:
p = input("请出拳(剪刀=1/石头=2/布=3):") print("登录成功!")
print("玩家出拳:" + p) break
import random if name != username:
list=['2','1','3'] print("用户名不存在,请重新输入!")
c=random.choice(list) if password != userpassword:
print("电脑出拳:"+c) print("密码输入有误,请重新输入!")
if p in list: print("用户名和密码错误!请重新输入")
if p == c: print("进入游戏")
print('平局') \ No newline at end of file
elif (p=='2' and c=='1') or (p=='1' and c=='3')or (p=='3' and c=='2'):
print('你赢了')
else:
print('你输了')
else:
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