40423152賴浚珅10/23
print("i have {0:d}dogs".format(6))輸出i have 6 dogs
print("i have {0:3d}dogs".format(6))輸出 i have 6 dogs
print("i have {0:03d }dogs".format(6))輸出i have 006 dogs
print("i have {0:f}dogs".format(6))輸出i have 6.000000 dogs
print("i have {0:.2f}dogs".format(6))輸出喔i have 6.00 dogs
salary = input("please enter your salary") bouns = input("please enter your bouns") paycheckAmount = salary + bouns print(paycheckAmount) 將你的薪水及獎金輸入,之後再將兩個分別加起來,並打印出來.