我正在遵循本指南,但无法使用基本功能。
birthday2.py
def happyBirthdayEmily(): #program does nothing as written
print("Happy Birthday to you!")
print("Happy Birthday to you!")
print("Happy Birthday, dear Emily.")
print("Happy Birthday to you!")
因此,按照指南,我输入以下内容:
>>>import birthday2
>>>happyBirthdayEmily
这是我得到的错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'happyBirthdayEmily' is not defined
我在这里想念什么?