writing the first Python program<1> How to write a Python program 1
- Open HyperTerminal
2. Enter python3 , enter the 3rd version of the Python programming language used by Python3, and if you enter only Python, the 2nd version of Python is used.
3. Enter the following code
Print ("helloWorld")
<2> How to write a Python program 2
Open editing software sublime
Write the following code in the code below.
Save Code
Run the program
<3> Another way to run a python program
- The Python interpreter path to execute when the first line of code is written, and you need to add ' x ' permissions to this Python file when you are finished editing
<4> PracticeRequirements: Write a program, outputitcast.cn
<5> Small Summary
- There are 3 ways to write a Python program, which one is more used in actual development? Usually the 2nd or 3rd, that is saved in the xxx.py file, so that the next run can be executed directly, and if the first method, each run the program will need to re-input, time-consuming and laborious
1.2 First Python program