input: Write a function to create a simple chatbot using Python and state diagrams, where the chatbot maintains a conversation based on predefined states and messages. The function should initialize the state, handle user input, update the state accordingly, and print the conversation history at the end. The function should also return the conversation history.
  assert simple_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.', 'Goodbye!']
  assert simple_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.', 'Goodbye!']
  assert simple_chatbot() == ['Hello! How can I help you?', "I don't understand what you mean. Please try again.", 'I need some advice', 'Sure, what kind of advice do you need?', 'Health advice', 'Focus on eating healthy and staying active. Make sure to consult a medical professional if you have any concerns.', 'Goodbye!']
  assert simple_chatbot() == ['Hello! How can I help you?', 'Can you answer my questions?', 'Yes, I'll do my best! What do you want to know?', 'Why is coding so hard', 'Coding can be challenging, especially at first. Just remember that with practice, patience and problem solving skills you can overcome the obstacles.', 'Goodbye!']
  assert simple_chatbot() == ['Hello! How can I help you?', "I don't understand what you mean. Please try again.", '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.', 'Goodbye!']
output: def simple_chatbot():
      conversation = []
      state = "start"
      
      while True:
          if state == "start":
              conversation.append("Hello! How can I help you?")
              user_input = input()
              if "advice" in user_input.lower():
                  state = "ask_advice_type"
              elif "questions" in user_input.lower():
                  state = "ask_question_type"
              else:
                  conversation.append("I don't understand what you mean. Please try again.")
                  state = "start"
          
          elif state == "ask_advice_type":
              conversation.append("Sure, what kind of advice do you need?")
              user_input = input()
              if "career" in user_input.lower():
                  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 "health" in user_input.lower():
                  conversation.append("Focus on eating healthy and staying active. Make sure to consult a medical professional if you have any concerns.")
              conversation.append("Goodbye!")
              break
          
          elif state == "ask_question_type":
              conversation.append("Yes, I'll do my best! What do you want to know?")
              user_input = input()
              if "tutorials" in user_input.lower():
                  conversation.append("You can find tutorials online or join coding communities to get help from experienced coders. StackOverflow and Cod Academy are great resources.")
              elif "coding" in user_input.lower() and "hard" in user_input.lower():
                  conversation.append("Coding can be challenging, especially at first. Just remember that with practice, patience and problem solving skills you can overcome the obstacles.")
              conversation.append("Goodbye!")
              break
      
      return conversation