Python

04. [Python] 비주얼 스튜디오 코드에서 작성하고 실행하기

drizzle0925 2021. 11. 4. 09:19
728x90

비주얼 스튜디오를 실행시키고 [새 파일...]을 클릭합니다.

 

아래 코드를 입력하고 파일을 저장합니다.

print("Hello World")

 

hello.py 파일이라고 저장합니다.

 

Python에 권장되는 확장을 설치하시겠습니까?라고 나오면 설치를 선택합니다.

(설치하시겠습니까?라는 문구가 나오지 않는다면 왼쪽에 [확장] 메뉴에서 [Python]을 입력하고 검색해서 설치하시면 됩니다.)

 

설치합니다.

 

탐색기를 열고 코드를 저장한 폴더에서 shift키를 누른 상태로 빈 곳을 마우스 오른쪽 버튼을 클릭하고 나타나는 메뉴에서 [여기서 PowerShell 창 열기] 또는 [여기에 명령 창 열기]를 선택합니다.

 

해당 폴더에서 명령 프롬프트가 실행됩니다. 아래 코드를 입력하고 엔터를 누릅니다.

python hello.py

 

Hello World 가 출력됩니다.

 

Github : https://github.com/jun0925/python/commit/6ddb3c631cb8cf0934e66fa29554d972b924f719

 

hello world 출력하기 · jun0925/python@6ddb3c6

Permalink This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. Browse files hello world 출력하기 Loading branch information Showing 1 changed file with 1 addition and 0 deletions. +1 −0 hel

github.com

 

728x90