input: Write a python function to iterate over a dictionary and print each key-value pair in the format "key: value".
  assert capture_output({"apple": 1, "banana": 2, "carrot": 3}) == "apple: 1\nbanana: 2\ncarrot: 3\n"
  assert capture_output({"x": 10, "y": 20, "z": 30}) == "x: 10\ny: 20\nz: 30\n"
  assert capture_output({"one": 1, "two": 2}) == "one: 1\ntwo: 2\n"
output: def capture_output(d):
      result = ""
      for key, value in d.items():
          result += f"{key}: {value}\n"
      return result