python输出百位十位个位,一起来了解一下吧
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GJ1R-0.png)
方法
首先先新建一个文件 。![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GI4K-1.png)
输入:data=https://www.leyongdm.com/input(“请输入一个三位整数/n”) 。
【python输出百位十位个位,Python输出百位上的数字】
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GG5P-2.png)
输入:data=https://www.leyongdm.com/int(data) 。
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GGN2-3.png)
输入:bai=123//100
shi=(123//10)%10
ge=123%10
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GM0M-4.png)
print开始输出:print(“百位上的数字为:”+str(bai))
print(“十位上的数字为:”+str(bai))
print(“个位上的数字为:”+str(bai))
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GL100-5.png)
点击run开始运行 。
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GJ162-6.png)
点击是 。
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GG064-7.png)
输入数值 。
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GJ147-8.png)
回车,效果如图所示 。
![python输出百位十位个位,Python输出百位上的数字](http://imgit.jingyanla.com/240307/124GG528-9.png)