Python
import turtle as t t.speed(0) t.color('Dark Blue') t.pensize(4) t.penup() t.goto(-400,400) t.pendown() t.begin_fill() t.goto(400,400) t.goto(400,-400) t.goto(-400,-400) t.goto(-400,400) t.end_fill() t.penup() t.color('black','white') t.goto(-120,170) t.pendown() t.begin_fill() t.goto(120,170) t.goto(120,-170) t.goto(-120,-170) t.goto(-120,170) t.end_fill() t.goto(-120,-170) t.color('black') t.penup() t.goto(-65,140) t.pendown() t.write('QQ账号登录',font=('楷体',20)) t.penup() t.goto(-100,100) t.pendown() t.write('账号',font=('楷体',20)) t.penup() t.color('black','grey') t.right(90) t.forward(5) t.left(90) t.forward(50) t.pendown() t.begin_fill() t.goto(100,95) t.goto(100,120) t.goto(-50,120) t.goto(-50,95) t.end_fill() t.goto(-50,120) t.penup() t.goto(-400,-400) print(' QQ账号登录') print('') a=input('账号') if a=='': t.goto(-122.5,0) t.color('red') t.write('“账号”不能为空',font=('楷体',22)) t.goto(-400,-400) print(' 账号不能为空') elif int(a)>99999999: t.goto(-48,95) t.color('black') t.write('********',font=('楷体',20)) t.goto(-120,0) t.color('red') t.write('账号位数不能超出8位',font=('楷体',19)) t.goto(-400,-400) print(' 账号位数不能超出8位') else: t.goto(-48,95) t.color('black') t.write(a,font=('楷体',20)) t.goto(-100,70) t.pendown() t.write('密码',font=('楷体',20)) t.penup() t.goto(-100,70) t.color('black','grey') t.right(90) t.forward(5) t.left(90) t.forward(50) t.pendown() t.begin_fill() t.goto(100,65) t.goto(100,90) t.goto(-50,90) t.goto(-50,65) t.end_fill() t.goto(-50,90) t.penup() t.goto(-400,-400) b=input('密码') if b=='': t.goto(-122.5,0) t.color('red') t.write('“密码”不能为空',font=('楷体',22)) t.goto(-400,-400) print(' 密码不能为空') elif int(b)>999999: t.goto(-48,65) t.color('black') t.write('******',font=('楷体',20)) t.goto(-120,0) t.color('red') t.write('密码位数不能超出6位',font=('楷体',19)) t.goto(-400,-400) print(' 密码位数不能超出8位') else: if int(a)==19491001 and int(b)==123456: t.goto(-48,65) t.color('black') t.write(b,font=('楷体',20)) t.goto(-111.5,0) t.color('green') t.write('“Zhang San张三”',font=('楷体',20)) t.goto(-62.5,-30) t.write('登录成功',font=('楷体',20)) t.goto(-400,-400) print(' “Zhang San张三”登录成功') else: t.goto(-48,65) t.color('black') t.write(b,font=('楷体',20)) t.goto(-120,0) t.color('red') t.write('“账号”或“密码”',font=('楷体',20)) t.goto(-40,-30) t.write('不正确',font=('楷体',20)) t.goto(-400,-400) print(' “账号”或“密码”不正确')