Commit 87f22a7f by BellCodeEditor

save project

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