Commit bded76d5 by BellCodeEditor

save project

parent 570273dd
Showing with 37 additions and 2 deletions
i = 0
s = 0
while True:
i+=1
s+=i
if i == 3:
break
print(s)
\ No newline at end of file
"""
"""
使用turtle模块画图
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
"""
import turtle
pen = turtle.Pen()
# 请创造师在下面接着创作
d = 1
while d < 500:
pen.forward(d)
pen.right(91)
d +=1
# 隐藏画笔,保存画布
pen.hideturtle()
turtle.done()
\ No newline at end of file
username = "python" import random
import random
from time import sleep #导入sleep()函数
i = 5
username = "python" username = "python"
userpassword = "123456" userpassword = "123456"
while True: while True:
if i>0:
name = input("请输入用户名:") name = input("请输入用户名:")
password = input("请输入密码:") password = input("请输入密码:")
i-=1
if name == username and password == userpassword: if name == username and password == userpassword:
print("登录成功!") print("登录成功!")
break break
...@@ -10,4 +15,6 @@ while True: ...@@ -10,4 +15,6 @@ while True:
print("用户名不存在,请重新输入!") print("用户名不存在,请重新输入!")
if password != userpassword: if password != userpassword:
print("密码输入有误,请重新输入!") print("密码输入有误,请重新输入!")
print("欢迎来到贝尔编程!") else:
print("您的账户已被冻结,请联系工作人员解冻")
exit()
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