当我运行这个简单的脚本并输入信息时会出现一个错误消息:Name error: name'...' is not defined
。当我运行此代码并输入信息时,为什么会出现“名称错误:名称”...“未定义”?
Name = str(input("Enter the name of your friend: "))
Age = int(input("Enter age of that friend: "))
print("The name of your friend is {} and their age is {}".format(Name, Age))
你使用Python2吗?也请修正你的代码中的错别字。 – shuttle87