- Practical Data Wrangling
- Allan Visochek
- 201字
- 2021-07-02 15:16:07
Running the Hello World program
In the following steps, I will walk through how to run a program using the terminal.
1. In your Terminal program, go ahead and change the working directory to the directory containing your hello_world.py program:
$ cd <relative/path/to/directory>
2. Verify that you are in the correct directory by using the appropriate command for your operating system. Once you have verified that you are in the correct directory, run the program by entering either of the following, depending on your setup:
$ python hello_world.py
$ python3 hello_world.py
Some operating systems will include a Python2 installation as Python and a Python3 installation as python3. There may be additional variations of the python command that are used by default. See the installation instructions in the external resources for more details.
- Once you run the program, you should see printed out in your Terminal the words Hello World!. If you did, congratulations! You successfully ran your first program in Python:

This is what running the Hello World program looks like on my machine. Yours might be slightly different, so use the previous instructions, and not this, as a reference to run your program.
推薦閱讀
- Canvas LMS Course Design
- 蕩胸生層云:C語言開發修行實錄
- 電腦上網直通車
- 空間傳感器網絡復雜區域智能監測技術
- 計算機圖形圖像處理:Photoshop CS3
- CorelDRAW X4中文版平面設計50例
- Python Algorithmic Trading Cookbook
- Embedded Programming with Modern C++ Cookbook
- 可編程序控制器應用實訓(三菱機型)
- 西門子變頻器技術入門及實踐
- 網絡管理工具實用詳解
- 工業機器人入門實用教程
- Serverless Design Patterns and Best Practices
- Practical Network Automation
- 傳感器應用技術