Jeongchul Kim
IntroduceGame.py 본문
- # Introduce Game
- print('How are you baby?')
- input()
- print('Ok. What are you doing?')
- input()
- print('Aha.. I see.')
- print() # 빈 줄 추가하기
- print('What\'s your major?') # \(백슬래시) + 확장문자(escape character)
- # escape Character (\\:\)(\n:enter)(\t:tab)
- input()
- print('It is interesting..kkk')
- print('What is your dream?')
- input()
- print('Oh really? It is so amazing', end=' ') #end 키워드 인자
- print('!')
- # print() 함수는 선택적으로 두 번째 파라미터 end를 사용할 수 있다.
- # 넘겨주는 빈 문자열을 키워드 인자(keyword argument)라고 한다.
- # end 파라미터는 특정 이름을 가지고 있고, end=' '문법 사용
- # end에 빈 문자열을 넘겨주면, 줄 바꿈을 자동으로 붙이지 않고, 빈 문자열을 붙인다.
- print('Ok. Thank you for talking with me')
'Computer Language' 카테고리의 다른 글
bug & debugger (0) | 2015.01.09 |
---|---|
DragonGame.py (0) | 2015.01.09 |
NumberGame.py (0) | 2015.01.09 |
hello.py (0) | 2015.01.09 |
01-04 Python 둘러보기 (0) | 2015.01.08 |
Comments