Commit 0e206bc6 by BellCodeEditor

save project

parent 1cada8c0
Showing with 20 additions and 45 deletions
import turtle
h=turtle.Screen()
h.bgcolor("yellow")
c=h.textinput("提示", "你想要多大的爱心呀?")
b=int(c)
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"
ud = "bowen"
n = input("用户名")
p = input("密码")
\ No newline at end of file
un = cao
ud = bowen
n = input("用户名")
p = input("密码")
if n == un and p == ud
print("登陆成功,开始游戏")
p = input("请出拳(剪刀=1/石头=2/布=3):")
print("玩家出拳:" + p)
import random
list=['2','1','3']
c=random.choice(list)
print("电脑出拳:"+c)
if p in list:
if p == c:
print('平局')
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
username = "cao"
userpassword = "bowen"
while True:
name = input("请输入用户名:")
password = input("请输入密码:")
if name == username and password == userpassword:
print("登录成功!")
break
if name != username:
print("用户名不存在,请重新输入!")
if password != userpassword:
print("密码输入有误,请重新输入!")
print("用户名和密码错误!请重新输入")
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