安卓手机用 QPython 写 Python:hello world

1. 安装 QPython

在应用市场中搜索 QPython,搜到以后进行安装。
image
image
我装过了,所以上图显示“打开”,你可能显示“安装”,点击即可。
需要设置存储权限,方便在手机上存代码。
image
image
image
image
image
这样就装好了。

2. 使用 QPython

打开QPython以后,是如下界面,点击终端,它会问你用python2还是python3,你选python3。
image
然后左上角返回,它会问你是否在后台运行终端,可选否。
打开编辑器
image
编辑一行代码:让程序输出“hello world",然后点击保存
image
保存为“helloworld.py"
image
然后回到编辑器界面,点击运行
image
就会在终端中运行这个代码,程序会输出一句话:
image

posted on 2022-08-31 13:17  luyi07  阅读(409)  评论(0编辑  收藏  举报

导航