The next day---Introduce the python compiler, pycharm settings, and write the first Python program

Source: Internet
Author: User
Tags pycharm community edition

Introducing the Python Compiler

1.linux under:

Generally use VI or vim to compile directly to the. py suffix file, use VI need to search for Vim Python auto-complete to facilitate our writing.

2.windos under:

(1) Use submit to choose Python type to compile, but for beginners submit need to install a lot of plugins, very troublesome. These will be mentioned later.

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/A7/67/wKioL1nmDveC9roTAACaySWyzDc034.png-wh_500x0-wm_ 3-wmp_4-s_1481369885.png "title=" Qq20171017201208.png "alt=" Wkiol1nmdvec9rotaacayswyzdc034.png-wh_50 "/>

(2) using EditPlus and other similar compiling software, the same Python class is selected for writing.

(3) The above compiler can be written in Python, but for large-scale development, the most authoritative or pycharm.

Pycharm Community Edition (free) and Professional Edition (charge) so the Community edition is generally used .

Bonus:http://www.jetbrains.com/pycharm/download/


Pycharm settings


1. Do not repeat the installation.

2. The first step is to set up the Python parser first, for example, if you have different versions of Python installed, you need to choose a good version to develop.

Click File---Setting---project Untitled---project Interpreter

Since only the 2.7 version is installed, there is no option to use it directly.

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/08/B8/wKiom1nmEmSB6yVtAADUURZirjs343.png-wh_500x0-wm_ 3-wmp_4-s_790976740.png "title=" Qq20171017204742.png "alt=" Wkiom1nmemsb6yvtaaduurzirjs343.png-wh_50 "/>

3. Set the Python compilation font:

Click File----Setting----Editor----font&color----Font

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/08/B8/wKiom1nmE4_g8OYVAADltsDo6S0604.png-wh_500x0-wm_ 3-wmp_4-s_489727346.png "title=" Qq20171017222531.png "alt=" Wkiom1nme4_g8oyvaadltsdo6s0604.png-wh_50 "/>

In the red place then set the font type size and line spacing, the specific values according to personal preference ~ ~ ~ ~ ~ ~ ~.

4. Set the auto-generated header file:

Click: File---Editor----Code style-----File and code template----Python Scripts

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/A7/68/wKioL1nmEaCzRn5GAAFWddq3h3M805.png-wh_500x0-wm_ 3-wmp_4-s_1764103400.png "title=" Qq20171017222948.png "alt=" Wkiol1nmeaczrn5gaafwddq3h3m805.png-wh_50 "/>

The Red box section is filled in according to your needs.

The first Python program


Write one of my Python interaction code:

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/08/B8/wKiom1nmFVDzVZ9AAABTa2V-v2Q731.png-wh_500x0-wm_ 3-wmp_4-s_3286124070.png "title=" code. png "alt=" wkiom1nmfvdzvz9aaabta2v-v2q731.png-wh_50 "/>

The name is defined to use Raw_input for interactive input.

The output in Python is done by the Print command, and the output needs to be "", and the plus sign "+" is used when connecting to the variable.

The Python script runs

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/08/B8/wKiom1nmFWaDypdoAAA356QeUQc449.png-wh_500x0-wm_ 3-wmp_4-s_53892021.png "title=" run. png "alt=" wkiom1nmfwadypdoaaa356qeuqc449.png-wh_50 "/>

You can click the Run item in the toolbar or click the green arrow in the diagram. Of course, we recommend the use of shortcut keys: SHIFT+ALT+F10.

Click to run the following:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/A7/68/wKioL1nmEgOQP6IVAAA0QB0LuoE615.png-wh_500x0-wm_ 3-wmp_4-s_1582611175.png "title=" Qq20171017221245.png "alt=" Wkiol1nmegoqp6ivaaa0qb0luoe615.png-wh_50 "/>

The green character is the input, and Python assigns the name to your input and then outputs it.

Well, the first prototype program has been completed, sprinkle flower ~ ~



This article is from the "11740637" blog, please be sure to keep this source http://11750637.blog.51cto.com/11740637/1973563

The next day---Introduce the python compiler, pycharm settings, and write the first Python program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.