Commit a83bd31c by BellCodeEditor

save project

parent d8c483b8
Showing with 52 additions and 9 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能
# 如果用户输入的账号、密码正确,提示登陆成功
\ No newline at end of file
i=3
zh="pont"
mm="1234567"
while True:
if i>0:
gh=input("请输入用户名:")
gm=input("请输入用密码:")
i-=1
if gh==zh and mm==gm:
print("登录成功")
break
if zh!=gh:
print("用户名错误!请重新输入")
print("温馨提示您还有"+str(i)+"次机会")
continue
if mm!=gm:
print("用密码错误!请重新输入")
print("温馨提示您还有"+str(i)+"次机会")
else:
print("您的帐号已锁定")
exit()
print("欢迎来到贝编程")
\ No newline at end of file
import turtle
pen=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("black")
co=["red","green","orange","yellow"]
pen.speed(0)
for i in range(900):
pen.pencolor(co[i%4])
pen.forward(i)
pen.right(91)
pen.hideturtle()
turtle.done()
bro1="关羽"
bro2="刘备"
bro3="张飞"
#三人来到了桃园准备结拜
bros=["刘备","羽关","张飞"]
bro1=["关羽",160,8.5]
bro2=["刘备",161,9.1]
bro3=["张飞",166,8.3]
bros[0]="关羽"
bros[0]="刘备"
print(bros)
\ No newline at end of file
for i in range(1,10):
for j in range(1,i+1):
print(j,"x",i,"=",(j*i),end="|")
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