python基础问题,用def函数

问题:编写一个名为n_w_h_output的函数,该函数接收后跟两个浮点的字符串。函数应使用以下格式打印这些参数,例如,如果用(Sam,69.7,1.9)调用函数,则函数应打印:“Sam’s weight is 69.7 and their height is 1.9”

# encoding: utf-8

def n_w_h_output(name, weight, height):
    print("{}’s weight is {} and their height is {}".format(name, weight, height))
    

n_w_h_output('Sam',69.7,1.9)