class mysoftware:
def __init__(self,name,password):
self.name=name
self.password=password
def isvaidateuser(self):
count=0
print("------------用户界面--------------")
while count<5:
print("请输入的用户名:")
self.name=input()
print("请输入你的密码:")
self.password=input()
if self.name=="admin"and self.password=="admin":
print(" 欢迎使用C#之星软件V1.0版本\n"" 普通用户界面")
break
else:
count+=1
print( "您的用户名密码输入错误,请重新输入")
else:
print("剩余次数为0,无法输入")
def isvalidatamanger(self):
print("------------管理员界面--------------")
print("请输入的管理名:")
self.name=input()
print("请输入你的密码:")
self.password=input()
if self.name=="admin"and self.password=="123456":
print(" 欢迎使用C#V1.0 Beata版\n"" 管理员界面")
c=mysoftware("name","password")
def userInput():
choice = input('请选择您的身份(输入0或1 ,0:用户 1:管理员):')
if choice == '0':
c.isvaidateuser()
elif choice == '1':
c.isvalidatamanger()
else:
print('您输入的不合法,请重新输入!')
userInput()
userInput()