How to write a small program in python, make a small program in python

Hello everyone, this article will focus on how to use python to make a small program. The process of making a small program in python is something that many people want to understand. If you want to figure out how to write a small program in python, you need to understand the following things first. .

Operate in windows environment

window+R enter cmd to create a folder mkdir pytxt

Create a py file py.py and edit it with tools such as notepad or notepad.

76960f49249af42c21f9dcfe8122cc3f.png

07d61599120dfd13cac2a4f7384eea65.pngor

ea8c674121ad69127c7e3e9b3eaf34a3.png

First of all, it is declared that there will be no Chinese garbled characters after python3.5, and it already supports Chinese, just like Java's jdk1.6 and later support Chinese.

Enter the python interactive environment and then perform data operations. The following commands are simple addition, subtraction, multiplication, and division.

ae45df84e470bfd5d63c45afce8cee3d.png

Let’s take a look at the Chinese operation of python2.0 version

Python Chinese coding

Python2.0 outputs "Hello, Wor

Guess you like

Origin blog.csdn.net/mynote/article/details/133003420