首页 > 代码库 > Learn Python 014: Funtions

Learn Python 014: Funtions

def weight_converter(gram):
    total_weight = gram / 1000
    return str(total_weight) + ‘KG‘
the_weight = weight_converter(3000)
print(the_weight)

 

Learn Python 014: Funtions