Why isn't Python importing this correctly?
Question: So, I have two files, HelloWorld.py and EnterExit.py. Here is the code for
HelloWorld:

    
    
    import EnterExit
    print('Hello world!')
    print('What is your name?')
    myName = input()
    print('It is good to meet you, ' + myName + '!')
    end()
    

And this is EnterExit:

    
    
    def end():
        print('Press enter to continue')
        input()
    

When I run HelloWorld, it works until end() is called. Then it says end()
isn't defined. What am I doing wrong here?


Answer: Either write:

    
    
    EnterExit.end()
    

Or:

    
    
    from EnterExit import end       # or import *
    end()
    

