-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObjectPractice
33 lines (26 loc) · 998 Bytes
/
ObjectPractice
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class User:
history = ''
def __init__(self):
print('회원가입을 해주세요')
self.userid = input('아이디를 입력해주세요.')
User.history = User.history + '이용자의 아이디 : '+self.userid + '\n'
while True:
self.userpw = input('비밀번호를 입력해주세요. (8자 이상 16자 이하)')
if len(self.userpw)>=8 and len(self.userpw)<=16:
User.history = User.history + '이용자의 비밀번호 : ' + self.userpw + '\n'
break
else :
continue
def check_signin(self):
print('당신의 아이디는 '+self.userid+'입니다')
print('당신의 비밀번호는 '+self.userpw+'입니다')
print('로그인 되었습니다.')
@classmethod
def id_data(cls):
print(User.history)
customer1 = User()
customer1.check_signin()
customer2 = User()
customer2.check_signin()
User.id_data()
# login class simple one