Commit e2da1c75 by BellCodeEditor

auto save

parent a0cbfb52
# 玩家出拳
player = input("请出拳:")
print("玩家出拳:" + player)
import random
list=[石头,剪刀,]
computer = random.choice(list)
print("计算机出拳:" + computer)
if player == computer:
print("平局")
elif (player=="石头" and computer=="剪刀")or(player=="剪刀" and computer=="布")or(player=="布" and computer=="石头"):
print("恭喜,你赢了")
else:
print("很遗憾,你输了")
\ No newline at end of file
import turtle
screen=turtle.Screen()
screen.bgcolor("light blue")
pen=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣啦\n我也喜欢python~\n——悟空",font=("Times",20,"normal"))
pen.hideturtle()
pen1=turtle.Pen()
pen1.pencolor("red")
pen1.pensize(5)
len=screen.textinput("提示","你想要多大的爱心呀?")
lovesize=int(len)
pen1.left(45)
pen1.forward(2*lovesize)
pen1.circle(lovesize,180)
pen1.right(90)
pen1.circle(lovesize,180)
pen1.forward(2*lovesize)
pen1.hideturtle()
\ No newline at end of file
i = 3
username = "python"
userpassword = "123456"
while True:
if i>0:
name=input("请输入用户名:")
password=input("请输入密码:")
i -=1
if name == username and password == userpassword:
print("登录成功!")
break
elif name != username:
print("用户名不存在,请重新输入!")
print("温馨提示:你还有"+str(i)+"次登录机会")
continue
elif password != userpassword:
print("密码输入有误,请重新输入!")
print("温馨提示:你还有"+str(i)+"次登录机会")
print("欢迎来到贝尔编程!")
else:
print("你的账户已被锁定,请一小时以后再来")
\ No newline at end of file
username = "python"
userpassword = "123456"
while True:
name=input("请输入用户名:")
password=input("请输入密码:")
if name == username and password == userpassword:
print("登录成功!")
break
if name != username:
print("用户名不存在,请重新输入!")
continue
if password != userpassword:
print("密码输入有误,请重新输入!")
print("欢迎来到贝尔编程!")
\ No newline at end of file
import turtle
pen=turtle.Pen()
for i in range(1,300):
pen.fd(i)
pen.right(91)
pen.hideturtle()
turtle.done()
\ No newline at end of file
import turtle
colors=["red","orange","yellow","green"]
pen=turtle.pen()
screen=turtle.Screen()
screen.bgcolor("black")
for i in range(1,300):
pen.fd(i)
pen.right(91)
pen.hideturtle()
turtle.done()
\ No newline at end of file
j=3
i=5
for i in range(1,10):
for j in range(1,i+1):
print(j,"*",i,"=",j*i,end=" ")
print()
\ No newline at end of file
# 玩家出拳
\ No newline at end of file
# 玩家出拳
player = input("请出拳:")
print("玩家出拳:" + player)
import random
list=[石头,剪刀,]
random.choice(list)
\ 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