Commit 2380e677 by BellCodeEditor

save project

parent c04d2fa7
Showing with 41 additions and 7 deletions
username = "python" username = "python"
userpassword = "123456" userpassword = "123456"
while True:
n = input("账号:")
p = input("密码:")
n = input("账号:") if n == username and p == userpassword:
p = input("密码:") print("登陆成功!")
break
else:
if username != n:
print("账号错误!")
else:
print("密码错误!")
print("登陆失败!")
if n == username and p == userpassword:
print("登陆成功!")
else:
print("账号密码错误!登陆失败!") \ No newline at end of file
\ No newline at end of file
import turtle
screen=turtle.Screen()
screen.bgcolor("light blue")
len=screen.textinput("爱心大小","你想要多大的爱心呀:")
loveside=int(len)
pen1=turtle.Pen()
pen1.hideturtle()
pen1.fillcolor("red")
pen1.begin_fill()
pen1.pensize(5)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(2*loveside)
pen1.circle(loveside,180)
pen1.right(90)
pen1.circle(loveside,180)
pen1.forward(2*loveside)
pen1.end_fill()
pen1.pencolor("black")
pen1.penup()
pen1.goto(80,-50)
pen1.write("hi,诺依~\n用python写电子贺卡真是太有趣了~\n我也喜欢python~\n————悟空",font=("黑体",11,"normal"))
pen1.hideturtle()
turtle.done()
\ 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