Python Forum

Full Version: Cannot call main function but I don't know why
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't know why I get an error with this
It says main is not defined


while True:
    main ()

def main(): 
    MainMenu = input("""Please select a function
    [1] Read Data
    [2] Write data
    [3] Filter data
    [4] Quit database
    """)
Put main function definition before the while loop.
(Mar-09-2018, 12:04 PM)j.crater Wrote: [ -> ]Put main function definition before the while loop.

THANNNNK YOUUUUU