# how to unpack argument in a functiondef health_calculator(age,apple_amnt, num_ciggrt): #this equation is just for consideration health = (100-age) + (apple_amnt*3.5) - (num_ciggrt*2.5) print(health) dieat_list = [45,10,1] health_calculator(dieat_list[0],dieat_list[1],dieat_list[2]) health_calculator(*dieat_list)
19 December 2017
unpacking argument in python
Subscribe to:
Post Comments (Atom)
-
/*** Md. Nazmul Hasan Shahjalal University of Science & Technology,Sylhet. hasan08sust@gmail.com ***/ #include<iostream> #i...
-
n = 1 while n: str = input () # print('Case no# %d :'%n) if str == ' * ' : break if str == ' Hajj ...
-
/*** Md. Namzul Hasan Shahjalal University of Science & technology,sylhet. hasan08sust@gmail.com ***/ #include<bits/stdc++.h...
No comments:
Post a Comment