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

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.

主站蜘蛛池模板: 庐江县| 兖州市| 新宾| 慈利县| 巢湖市| 宽城| 茶陵县| 北安市| 东城区| 开阳县| 登封市| 海宁市| 民丰县| 原阳县| 苍溪县| 东乡族自治县| 克拉玛依市| 尉氏县| 怀柔区| 石阡县| 汾西县| 宜都市| 建水县| 壶关县| 自治县| 金山区| 商水县| 仙桃市| 陆丰市| 墨竹工卡县| 澄城县| 右玉县| 大港区| 于都县| 内乡县| 化德县| 乌鲁木齐县| 尉犁县| 拉萨市| 礼泉县| 红安县|