Ad

ezz fix, ik i'm good

Code
Diff
  • def multiply (a,b):
        return a * b
    • def multiply (a,b):
    • a * b
    • return a * b

import statistics

def est_height(gender, dad_height, mom_height):

if gender == "boy": 
    return (dad_height + mom_height)/2 + 0.5 
elif gender == "girl":  
    return (dad_height + mom_height)/2 - 0.5
Code
Diff
  • import statistics
    
    def est_height(gender, dad_height, mom_height):
    
        if gender is "boy": 
            return statistics.mean([dad_height, mom_height]) + 0.5 
        elif gender is "girl":  
            return statistics.mean([dad_height, mom_height]) - 0.5
    • import statistics
    • def est_height(gender, dad_height, mom_height):
    • SPEEDOFLIGHT = 299792458
    • MODIFIER = 0.5
    • boy_height = statistics.mean([dad_height, mom_height]) + (SPEEDOFLIGHT * (MODIFIER / SPEEDOFLIGHT))
    • girl_height = statistics.mean([dad_height, mom_height]) - (SPEEDOFLIGHT * (MODIFIER / SPEEDOFLIGHT))
    • if gender is "boy":
    • return boy_height
    • return statistics.mean([dad_height, mom_height]) + 0.5
    • elif gender is "girl":
    • return girl_height
    • return statistics.mean([dad_height, mom_height]) - 0.5