python輸出百位十位個位

python輸出百位十位個位,一起來了解一下吧

python輸出百位十位個位



step1: 首先先新建一個文件 。
python輸出百位十位個位



step2: 輸入:data=https://www.i8ku.com/2022/input("請輸入一個三位整數\n") 。
【python輸出百位十位個位】
python輸出百位十位個位


step3: 輸入:data=https://www.i8ku.com/2022/int(data) 。
python輸出百位十位個位



step4: 輸入:bai=123//100shi=(123//10)%10
ge=123%10
python輸出百位十位個位


step5: print開始輸出:print("百位上的數字為:"+str(bai))print("十位上的數字為:"+str(bai))
print("個位上的數字為:"+str(bai))
python輸出百位十位個位


step6: 點擊run開始運行 。
python輸出百位十位個位


step7: 點擊是 。
python輸出百位十位個位


step8: 輸入數值 。
python輸出百位十位個位


step9: 回車,效果如圖所示 。
python輸出百位十位個位



    猜你喜歡