def weight_converter(gram):
total_weight = gram / 1000
return str(total_weight) + 'KG'
the_weight = weight_converter(3000)
print(the_weight)
def weight_converter(gram):
total_weight = gram / 1000
return str(total_weight) + 'KG'
the_weight = weight_converter(3000)
print(the_weight)
转载于:https://www.cnblogs.com/mxyzptlk/p/7192242.html