# 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)
-
Suppose you have 24 and you need to find out all divisors of the number. The normally what we do? We just divide the number from 1 to 24. T...
-
#To make a simple gui follow the instructions. You need to at first install PyQt4 in your system. If you use linux run the code sudo apt-ge...
-
It will be easy to solve the problem if you know about the Nim game. " Nim has been mathematically solved for any number of initial...
No comments:
Post a Comment