Notice
Recent Posts
Recent Comments
Today
Total
04-30 08:58
Archives
관리 메뉴

Jeongchul Kim

IntroduceGame.py 본문

Computer Language

IntroduceGame.py

김 정출 2015. 1. 9. 16:20
    1. # Introduce Game
    2.  
    3. print('How are you baby?')
    4. input()
    5. print('Ok. What are you doing?')
    6. input()
    7. print('Aha.. I see.')
    8. print() # 빈 줄 추가하기
    9. print('What\'s your major?') # \(백슬래시) + 확장문자(escape character)
    10. # escape Character (\\:\)(\n:enter)(\t:tab)
    11. input()
    12. print('It is interesting..kkk')
    13. print('What is your dream?')
    14. input()
    15. print('Oh really? It is so amazing'end=' ') #end 키워드 인자
    16. print('!')
    17. # print() 함수는 선택적으로 두 번째 파라미터 end를 사용할 수 있다.
    18. # 넘겨주는 빈 문자열을 키워드 인자(keyword argument)라고 한다.
    19. # end 파라미터는 특정 이름을 가지고 있고, end=' '문법 사용
    20. # end에 빈 문자열을 넘겨주면, 줄 바꿈을 자동으로 붙이지 않고, 빈 문자열을 붙인다.
    21. 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