title: How to fix ' name "xxx" is not defined
body: <p>In my program, I'm trying to run a "def command" in a conditional statement. An error pops up saying name 'command' is not defined.</p>
  
  <p>I tried to rewrite the code and tried to reload the repl.it server many times.</p>
  
  <pre><code>def main():
     inputmain = input("...")
     if inputmain == "Yes" or "yes" or "y" or "Y":
       command()
    elif inputmain == "No" or "no" or "n" or "N":
       print("Ok.")
    else:
       print("Error")
  main()
  def command():
   ...
   ...
  command()
  </code></pre>
  
  <p>I expect the output of "y" to be the program command() but it's the error above. </p>