Joke Collection Website - Bulletin headlines - How to write the coordinates of two points in python

How to write the coordinates of two points in python

Python is a widely used scripting language, and Google's web pages are also written in Python. Python has shown powerful functions in the fields of biological information, statistics, web page making and calculation. Python, like other scripting languages such as java, R and Perl, can run scripts directly on the command line. Tools/raw materials

PythonCMD command line; Windows operating system

Methods/steps

1. Download and install python first. It is recommended to install version 2.7 or above and version 3.0 or below. Because version 3.0 or above is not backward compatible, the experience is very poor.

2. Open a text editor and recommend editplus, Notepad, etc. , and save the file in. Py format. Editplus and notepad support python syntax recognition.

The first line of the script must be written with #! usr/bin/python

Indicates that the script file is an executable python script.

If the python directory is not in the usr/bin directory, it will be replaced with the directory of the current python executor.

3. Pay attention to debugging after writing the script, and you can debug it directly with editplus. Debugging method can be Baidu. When the script is finished, open the CMD command line, provided that python has been added to the environment variable. If not, please Baidu.

4. In the CMD command line, enter "python"+"space", that is, "python"; Drag the written script file to the current cursor position, and then press enter to run.