Commit 87f22a7f by BellCodeEditor

save project

parent 2cc0c7a2
Showing with 21 additions and 17 deletions
class Cat:
def __init__(self):
self.footNum = 4 # 腿
self.eyeNum = 2 # 眼睛
self.head = 1 # 头
self.earsNum = 2 # 耳朵
self.skin = "black"
def run(self):
print("小猫飞快的跑起来")
def skill(self,enemy):
print("小猫抓到"+enemy)
role = Cat()
role.skill("老鼠")
\ No newline at end of file
username = "python"
i=3
userpassword = "123456"
while True:
if i>0:
name = input("请输入用户名:")
password = input("请输入密码:")
if name == username and password == userpassword:
print("登录成功!")
break
if name != username:
print("用户名不存在,请重新输入!")
i-=1
else:
print("密码输入有误,请重新输入!")
i-=1
else:
print("输入次数大于3次,已封锁。请到部门重新解锁")
exit()
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