美文网首页
Python 18 Programming Tutorial

Python 18 Programming Tutorial

作者: 豆表示低调 | 来源:发表于2016-08-31 11:41 被阅读0次
def health_calculator(age, apples_ate, cigs_smoked):
    answer = (100-age) + (apples_ate * 3.5) - (cigs_smoked * 2)
    print(answer)


buckys_data = [27, 20, 0]

health_calculator(buckys_data[0], buckys_data[1], buckys_data[2])
health_calculator(*buckys_data)

相关文章

网友评论

      本文标题: Python 18 Programming Tutorial

      本文链接:https://www.haomeiwen.com/subject/gdaxettx.html