1, create a new project
File--> New Project ...
2, create a new file
Right-click the Helloword project you just built and choose New--> Python File
3, enter file name
Enter file name, there's nothing to say
4, enter the writing interface
Pycharm's default editing interface is strange, and automatically generates a row of __author__ = "Author" headers. And more commonly used file headers, such as: #coding =utf-8, but not automatically generated.
Enter code:
Print "Hello word!"
5, set the console
Before running, we found that the "Run" and "Debug" on the shortcut menu are grayed out and cannot be triggered. Because we need to configure the console first.
Click the black inverted triangle next to the run to enter the "Run/debug Configurations" configuration interface. (or click Run--> Edit configurations)
In the "Run/debug Configurations" Configuration interface,
Click on the green plus sign, create a new configuration item, and select Python. (Because Hello Word is a python program)
In the configuration interface on the right:
Name in the column, say hello.
Click the SCRIP option to find what we wrote just now hello_word.py
Click OK, automatically return to the editing interface, this time the "Run" "Debug" button all turn green!
6, run
Click the Green Run button to see the results of the output:
Ok,pycharm's first