title: Can't access the functions inside the code with the input menu
body: <p>I cannot access the functions in the rest of the code in the input menu
  The user is supposed to input a letter to which that letter will take him to the function of the program and continue editing as the function states, but I get an error message stating &quot;NameError: name 'reg_user' is not defined&quot;.</p>
  <pre><code>def display_menu_options():    
  
      global menu_options
  
      menu_options = input('''Please select one of the following options:
  
  a - Adding a task
  va - View all tasks
  vm - View my tasks
  e - Exit
  :''').lower()
  
      if menu_options == &quot;a&quot;:
          add_task()
      elif menu_options == &quot;va&quot;:
          view_all()
      elif menu_options == &quot;vm&quot;:
          view_mine()
      elif menu_options == &quot;e&quot;:
          print(&quot;Goodbye!&quot;)
      else:
          print(&quot;You have made a wrong choice, Please Try again&quot;)
  
      return menu_options
  
  def display_admin_menu_options():
  
      global menu_options
  
      menu_options = input('''Please enter one of the following options:
      
  r - register user
  a - add task
  va- view all tasks
  vm - view my tasks
  gr - generate reports
  ds - display statistics
  e - exit
  :''').lower()
  
      if menu_options == &quot;r&quot;:
          reg_user()
      elif menu_options == &quot;a&quot;:
          add_task()
      elif menu_options == &quot;va&quot;:
          view_all()
      elif menu_options == &quot;vm&quot;:
          view_mine()
      elif menu_options == &quot;gr&quot;:
          generate_reports()
      elif menu_options == &quot;ds&quot;:
          all_statistics()
      elif menu_options == &quot;e&quot;:
          print(&quot;Goodbye!&quot;)
      else:
          print(&quot;You have made a wrong choice, Please Try again&quot;)
  
      return menu_options
  
  def login():
  
      username = input(&quot;Enter your username: &quot;)
      password = input(&quot;Enter your password: &quot;)
  
      for line in open('user.txt', 'r').readlines():
          field = line.strip().split(&quot;, &quot;)
          if username == field[0] and password == field[1]:
              print('Welcome' + username)
              return True, field[0] == &quot;admin&quot;
  
      return False, False
  
  login_success, is_admin = login()
  
  if login_success and is_admin:
      display_admin_menu_options()
  elif login_success:
      display_menu_options()
  else:
      print(&quot;Username or password incorrect!&quot;)
  </code></pre>