Ad
Code
Diff
  • def est_height(gender,dad_height,mom_height):
        return (dad_height+mom_height+1)/2 if gender == "boy" else (dad_height+mom_height-1)/2
    • def est_height(gender, dad_height, mom_height):
    • def est_height(gender,dad_height,mom_height):
    • return (dad_height+mom_height+1)/2 if gender == "boy" else (dad_height+mom_height-1)/2
Code
Diff
  • multiply = lambda a, b: a*b
    print(multiply(5, 10))
    
    • def multiply(a,b):
    • result = a*b
    • return result
    • multiply (5,10)
    • print(multiply(5,10))
    • multiply = lambda a, b: a*b
    • print(multiply(5, 10))