input: Write a python function to convert a formatted string into a dictionary.
  assert convert_to_dict("Name: John Doe; Age: 23; Course: Data Science") == {"Name": "John Doe", "Age": "23", "Course": "Data Science"}
  assert convert_to_dict("City: New York; Population: 8419000; Area: 468.9 sq mi") == {"City": "New York", "Population": "8419000", "Area": "468.9 sq mi"}
  assert convert_to_dict("Title: Inception; Director: Christopher Nolan; Year: 2010") == {"Title": "Inception", "Director": "Christopher Nolan", "Year": "2010"}
output: def convert_to_dict(formatted_string):
      dictionary = {}
      pairs = formatted_string.split('; ')
      for pair in pairs:
          key, value = pair.split(': ', 1)
          dictionary[key] = value
      return dictionary