How to use python after downloading it?
Simple method of using python after downloading:
1. In win10 system, just click the search input idle in the lower left corner to see the application, click Open
The first method to enable python
If you see three greater than signs appearing and a cursor flashing behind them, it means the startup is successful
Confirm that the activation is successful
The first program is to print print. Enter print("hello") behind the cursor to print hello on the next line
Write the first program
How to define and use variables
Define variables
The key combination alt p can return the last executed command, and alt n returns the next command of the sentence.
Simple judgment whether two values are the same
Judgment 1
Judgment 2
2.win R open and run
Enable python The second method
Enter python in the black window that opens After pressing Enter, you will still see the above operation interface, just operate it directly
Run python in cmd
Press ctrl z in the cmd black window You can exit python. Under Linux system, press ctrl D to exit python
In addition to writing the program according to the first method, you can also create a new blank page and save it in .py format. You can use notepad or sublime. text, the text document that comes with Windows can also be used, just don’t make a mistake in the final saving format. Here I use IDLE, select the first file in the upper left corner and there is a new file,
New file
After creating it, you can write normally Program
Related recommendations: "Python Tutorial"
The above is the detailed content of How to use python after downloading it. For more information, please follow other related articles on the PHP Chinese website!