zhongliang_hs(35120)
#带返回值:
def zhongliang_hs(ke):
qianke=ke//1000
ke_a=ke%1000
return (qianke,ke_a)#返回值为元组可以返回多个值
re=zhongliang_hs(35426)
print("%d千克%d克"%(re[0],re[1]))
#带返回值:
def zhongliang_hs(ke):
qianke=ke//1000
ke_a=ke%1000
return (qianke,ke_a)#返回值为元组可以返回多个值
re=zhongliang_hs(35426)
print("%d千克%d克"%(re[0],re[1]))