Drop links or images here to add them to the editor.

Suppose that the life expectancy for an average person is 70 years, and that this life expectancy can be adapted based on the following criteria:

Based on the formula, the life expectancy of a male smoker that exercises only two hours a week, drinks ten glasses of alcohol a week and eats fast food fairly often, is 65.5 years.

Note: This is NOT a scientific prophecy. Those that have constructed this question can't be put responsible for wrong prophecies of the age you will die! I have considered a scientifically build questionnaire, but seeing as it asked questions concerning your stools, I decided to make one up myself.

Assignment

Write a function life_expectancy to which the five parameters below should be passed:

Based on the values given, the function should predict the life expectancy, and has to print this prognosis as a result. The result of the function should be given as an integer.

Example

>>> life_expectancy(sex='man', smoker=True, sports=2, alcohol=10, fastfood=True)
65.5
>>> life_expectancy(sex='man', smoker=True, sports=5, alcohol=5, fastfood=True)
70.0
>>> life_expectancy(sex='woman', smoker=False, sports=5, alcohol=0, fastfood=False)
89.0
>>> life_expectancy(sex='woman', smoker=False, sports=3, alcohol=14, fastfood=True)
78.5
>>> life_expectancy(sex='man', smoker=False, sports=4, alcohol=4, fastfood=False)
82.0