python def say_hello_to(name): 运行错误 求解答
发布网友
发布时间:2023-07-09 06:48
我来回答
共1个回答
热心网友
时间:2024-05-18 16:15
注意写法,你的输出语句要放在函数里。
def say_hello_to(name):
"""print a hello massage"""
cap_name=name.capitalize()
print('Hello '+ cap_name +',how are you?')
say_hello_to("myname")
#Hello Myname,how are you?