Python


TypeError

  • TypeError: **init**\ () takes 1 positional argument but 3 were given

    • Example: bmi = calculate_bmi(heigh,weight)
    • Reason: only position arguments were passed bmi = calculate_bmi(x,y)
    • Solution: pass keyword arguments bmi = calculate_bmi(height=x, weight=y)