from wcontrol.conf.config import BMI, BFP


class results(object):
    def __init__(self, control, gender):
        self.bmi = self.get_bmi(control.bmi)
        self.fat = self.get_fat(control.fat, gender)

    def get_bmi(self, bmi):
        for limit, msg in BMI:
            if bmi <= limit:
                return msg

    def get_fat(self, fat, gender):
        for limit_w, limit_m, msg in BFP:
            if gender == 'Feminine' and fat <= limit_w:
                return msg
            if gender == 'Masculine' and fat <= limit_m:
                return msg

@@ -34,17 +34,25 @@
 BMI, BFP
+, MUSCLE
 %0A
-
 %0A%0Aclass 
@@ -206,16 +206,78 @@
  gender)
+%0A        self.muscle = self.get_muscle(control.muscle, gender)
 %0A%0A    de
@@ -547,16 +547,16 @@
 urn msg%0A
-
         
@@ -611,28 +611,289 @@
 %0A                return msg%0A
+%0A    def get_muscle(self, muscle, gender):%0A        for limit_w, limit_m, msg in MUSCLE:%0A            if gender == 'Feminine' and muscle %3C= limit_w:%0A                return msg%0A            if gender == 'Masculine' and muscle %3C= limit_m:%0A                return msg%0A

Add function to get the skeletal muscle result