basic function not working -> 'name 'happyBirthdayEmily' is not defined'
Question: I'm following [this guide](http://anh.cs.luc.edu/python/hands-
on/3.1/handsonHtml/functions.html) and I can't get a basic function to work.

`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!")
    

So following the guide I type this:

    
    
    >>>import birthday2
    >>>happyBirthdayEmily
    

This is the error I get:

    
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'happyBirthdayEmily' is not defined
    

What Am I missing here?


Answer: you should do:

    
    
    >>>import birthday2
    >>>birthday2.happyBirthdayEmily()
    

or:

    
    
    >>>from birthday2 import happyBirthdayEmily
    >>>happyBirthdayEmily()
    

or:

    
    
    >>>from birthday2 import *
    >>>happyBirthdayEmily()
    

Read more about modules [here](http://docs.python.org/2/tutorial/modules.html)

