01. 준비 - 03. 개발 환경 설정(3)
◎ "#" - 주석 표시
◎ print('Hello Python!') 입력
◎ Ctrl+S - 저장 (파일명: section01.py)
◎ 실행(Run) 〉 디버깅 없이 실행(Run Without Debugging) 클릭
◎ 터미널창에 다음과 같이  출력.
 
◎ 단축키 찾기 - 파일(File) 〉 기본 설정(Preferences) 〉 바로 가기 키(Keyboard Shortcuts) 클릭 (단축키: Ctrl+K Ctrl+S)
 
◎ 'task runner' 설정
    보기(View) 〉 명령 팔레트(Command Palette...) 
   → "task" 입력 
   → "Tasks: Configure Task" 클릭
   → "템플릿에서 tasks.json 파일 만들기 (Create tasks.json file from template) " 클릭
   → "Others" 클릭 → tasks.json 생성  
   → 기존 코드 지우고 vscode 설정파일(강의자료) 복사해서 붙여넣고 저장
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Project Label",
            "type": "shell",
            "command": "python",
            "args": [
                "${file}"
            ],
            "presentation": {
                "reveal": "always",
                "panel": "new"
            },
            "options": {
                "env": {
                    "PYTHONIOENCODING": "UTF-8"
                }
            },
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
 Task Runner 설정
Task Runner 설정
◎ 한글 깨지지 않고 출력되게 설정 : "PYTHONIOENCODING": "UTF-8" 
◎ Ctrl+Shift+B : 간략하게 실행
◎ VSCode 환경 언어 변경 
   - 영어 ≫ 한글 : 확장(Extensions) → "korean" 입력 → 한글 확장팩 설치
   - 한글 ≫ 영어 : 보기(View) 〉 명령 팔레트(Command Palette) 
      → "lan" 입력 → "Configure Display Language" 클릭
      → "locale.json" 파일 생성 
      → "locale":"en" 입력후 저장 (※ Ctrl+space : 언어 리스트 나옴) 
      → VSCode 재실행
 
  
02. 기초 - 01. Print 함수의 이해(1)
◎ 문자열 출력 : "", '', """ """, ''' ''' 
# 기본 출력
print('Hello Python!')
print("Hello Python!")
print("""Hello Python!""")
print('''Hello Python!''')
 print 함수
print 함수
◎ print 함수 - Seperator 옵션 : 문자 혹은 문자열을 sep=''에 입력한 문자로 연결해서 출력
print()
#Seperator 옵션 사용
print('T','E','S','T', sep='')
print('2019','02','19', sep='-')
print('niceman','google.com',sep='@')
 print 함수 - Seperator 옵션
print 함수 - Seperator 옵션
◎ print 함수 - end 옵션 : 다음 라인과 연결해서 출력
# end 옵션
print('Welcome To', end='')
print(' the black paradise', end=' ')
print('piano notes')
print('testtest')
 print - end 옵션
print - end 옵션
 
https://www.fastcampus.co.kr/courses/200328/clips/
 
패스트캠퍼스 온라인 강의 - 파이썬 웹 개발 올인원 패키지 Online.
 
www.fastcampus.co.kr