Commit ff11b6c2 by BellCodeEditor

auto save

parent 370cf254
Showing with 59 additions and 9 deletions
import turtle
turtle.penup()
turtle.goto(-105,-105)
turtle.pendown()
for i in range(4):
turtle.forward(200)
turtle.left(90)
turtle.penup()
turtle.goto(0,0)
turtle.dot(20,"red")
turtle.pendown()
turtle.penup()
turtle.goto(-40,0)
turtle.dot(20,"red")
turtle.pendown()
turtle.penup()
turtle.goto(40,0)
turtle.dot(20,"red")
turtle.pendown()
turtle.hideturtle()
turtle.done()
\ No newline at end of file
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) import turtle
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) a=turtle.Pen()
for i in range(4):
# 请用input()实现用户输入账号、密码的功能 a.forward(200)
a.left(90)
a.penup()
a.left(90)
# 如果用户输入的账号、密码正确,提示登陆成功 a.forward(100)
\ No newline at end of file a.right(90)
a.forward(60)
a.pendown()
a.pencolor('red')
a.fillcolor('red')
a.begin_fill()
a.circle(10)
a.end_fill()
a.penup()
a.forward(40)
a.pendown()
a.begin_fill()
a.circle(10)
a.end_fill()
a.penup()
a.forward(40)
a.pendown()
a.begin_fill()
a.circle(10)
a.end_fill()
a.hideturtle()
turtle.done()
\ No newline at end of file
#“计算长方形的面积并输出结果:”
a=6#设置长方形长的长度
b=3#设置长方形宽的长度
s=a*b#计算长方形的面积
print('长方形的面积为:'+str(s))#输出长方形的面积
\ 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