input: Write a function to create a simple chatbot using Python and state diagrams. The function should initialize the states and manage the conversation flow based on user inputs. The function should return the conversation history at the end of the interaction.
  assert chatbot() == ['Hello! How can I help you?', 'I need some advice', 'Sure, what kind of advice do you need?', 'Career advice', 'It is always a good idea to research the field you are interested in and creating a plan to learn the skills that are required. Make sure to contact professionals in the field to understand their experience.']
  assert chatbot() == ['Hello! How can I help you?', 'Can you answer my questions?', 'Yes, I'll do my best! What do you want to know?', 'Where can I find good tutorials', 'You can find tutorials online or join coding communities to get help from experienced coders. StackOverflow and Cod Academy are great resources.']
output: def chatbot():
      conversation = []
      conversation.append("Hello! How can I help you?")
      
      user_input = input()
      conversation.append(user_input)
      
      if "advice" in user_input:
          conversation.append("Sure, what kind of advice do you need?")
          user_input = input()
          conversation.append(user_input)
          
          if "career" in user_input:
              conversation.append("It is always a good idea to research the field you are interested in and creating a plan to learn the skills that are required. Make sure to contact professionals in the field to understand their experience.")
      
      elif "questions" in user_input:
          conversation.append("Yes, I'll do my best! What do you want to know?")
          user_input = input()
          conversation.append(user_input)
          
          if "tutorials" in user_input:
              conversation.append("You can find tutorials online or join coding communities to get help from experienced coders. StackOverflow and Cod Academy are great resources.")
      
      return conversation