Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

멋사 4차 세미나 - 이예린 #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions 4th_session/register.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
print('=========================')
print('회원가입')
print('=========================')

register=False

while not register:
print('회원가입을 진행하시겠습니까?')
print('y: 진행 N: 취소')
answer=input('>> ')
answer=answer.lower()

if answer=='y':
register=True
print('=========================')
print('회원가입이 진행됩니다.')
print('=========================')
elif answer=='n':
print('=========================')
print('회원가입이 취소됩니다.')
print('=========================')
else:
print('입력 값을 확인해주세요.')

#2
users=[]

while True:
user={}
username=input('ID: ')
while True:
pwd=input('PWD: ')
pwd2=input('PWD 확인: ')
if pwd==pwd2:
break
else:
print('패스워드가 일치하지 않습니다.')
name=input('이름: ')
while True:
birth=input('생년월일(6자리): ')
if len(birth)==6:
break
else:
print('생년월일 입력값이 올바르지 않습니다.')
email=input('이메일: ')

#3
user['username']=username
user['password']=pwd
user['name']=name
user['birth']=birth
user['email']=email

users.append(user)
print(users)

print('=========================')
print(user['name'],'님 가입을 환영합니다!')
print('=========================')

print('회원가입을 추가로 진행하시겠습니까?')
print('y: 진행 n: 취소')
answer=input('>> ')
answer=answer.lower()

if answer=='y':
pass
elif answer=='n':
exit()