安卓手机用 QPython 写 Python:hello world


1. 安装 QPython

在应用市场中搜索 QPython,搜到以后进行安装。

Qpython运算 qpython怎么用_搜索


Qpython运算 qpython怎么用_Qpython运算_02


我装过了,所以上图显示“打开”,你可能显示“安装”,点击即可。

需要设置存储权限,方便在手机上存代码。

Qpython运算 qpython怎么用_python_03


Qpython运算 qpython怎么用_python_04


Qpython运算 qpython怎么用_Qpython运算_05


Qpython运算 qpython怎么用_后台运行_06


Qpython运算 qpython怎么用_python_07


这样就装好了。

2. 使用 QPython

打开QPython以后,是如下界面,点击终端,它会问你用python2还是python3,你选python3。

Qpython运算 qpython怎么用_搜索_08


然后左上角返回,它会问你是否在后台运行终端,可选否。

打开编辑器

Qpython运算 qpython怎么用_搜索_09


编辑一行代码:让程序输出“hello world",然后点击保存

Qpython运算 qpython怎么用_python_10


保存为“helloworld.py"

Qpython运算 qpython怎么用_搜索_11


然后回到编辑器界面,点击运行

Qpython运算 qpython怎么用_后台运行_12


就会在终端中运行这个代码,程序会输出一句话:

Qpython运算 qpython怎么用_python_13