'''
사이트별로 비밀번호를 만들어 주는 프로그램 만들기
비밀번호는 사이트 이름의 처음 세자리 + 글자 수 + '!'로 구성
예) site = 'http://[Log in to view URL]' => 비밀번호는 nav5!
'''

site = "http://[Log in to view URL]"

'''
규칙1: 'http://' 글자를 빼기
규칙2: .(점) 앞까지만 남기기
규칙3: 비밀번호 만들기
남은 글자 중 처음 세자리 + 글자 수 + "!" 로 구성
'''

#규칙1 힌트 : replace 사용
site = site.???

#규칙2 힌트 : .으로 나누고, 앞의 원소만 사용
site = site.???

#규칙3 
#앞에서 3글자 : 슬라이싱 이용
three = ???
#site에 남은 전체 글자 수
length = ???
#세자리 + 글자 수 + '!' 로 구성된 password 만들기
password = (??? + ??? + ???)

print("생성된 비밀번호:", password)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: