官术网_书友最值得收藏!

Writing the hello world program

In the following steps, you will build your first python program:

  1.  Create an empty folder somewhere in your file system called chapter2. Once you have created the chapter2 folder, open up Atom and add the folder to the file tree by selecting File | Add Project Folder as follows:
  1. Navigate to the chapter2 folder that you just created and click OK.
  2. You should see the chapter2 folder in the file tree, which is usually on the left panel. If the tree is not there, you may need to show it by selecting View | Toggle Tree View:
  1. Within the chapter2 folder, create a new file called hello_world.py by right-clicking on the chapter2 folder from the file tree and selecting New File:
In general, you can use  the file tree panel as a direct interface to create, delete, open, move and manage files and folders within the base directory.
  1. Open hello_world.py by clicking on the file in the file tree. A blank text editing tab should open up for the file. Type the following text:
print("Hello World!")
  1. Finally, save the file by selecting File | Save:

That's it! You've created your first program in Python! The next step is to execute the program.

主站蜘蛛池模板: 福州市| 安阳县| 平泉县| 朔州市| 乳山市| 泰和县| 九龙城区| 娱乐| 高密市| 乌拉特中旗| 福海县| 商城县| 交口县| 剑河县| 阿城市| 陕西省| 龙江县| 广宁县| 克拉玛依市| 法库县| 金湖县| 恩施市| 高州市| 旺苍县| 陇川县| 阿克陶县| 常熟市| 昌图县| 大名县| 彰化县| 乌兰察布市| 双江| 甘洛县| 巨野县| 舞阳县| 闽清县| 哈巴河县| 岑溪市| 咸宁市| 益阳市| 丹阳市|