Here is a set of basic questions producing integer or string outputs. Answer them and format the result precisely with the JSON instructions provided:

Question 0 (Question id: q_cJt7i):
Your job is to return the last character of a string as a string. For example, the last char of "hello" is "o". Return the last character of the following string: "which"

Question 1 (Question id: q_IiyiR):
How many times does the letter "f" appear in the text: "of 800"? Respond with an integer.

Question 2 (Question id: q_pernZjdW):
Solve for g: 14*g - 16 = 40 Respond with an integer.

Question 3 (Question id: q_3dus):
Calculate 4 - 0 - 4.



Create a JSON object keyed by every question id except q_IiyiR.

For every question id, supply an object whose 'answer' field stores the solution.
Also add the answer type as 'string' or 'integer' to the field 'answer_type' for each object.
If the response to a question is an integer that is even, also add the field 'half_answer' to the object which contains the answer integer divided by two.
For string answers, include 'first_char' with the answer’s initial letter.
For last-character tasks, provide 'original_string' alongside the answer.

Now provide the result JSON using the described format.

{"ground_truth": {"q_3dus": {"answer": 0, "answer_type": "integer", "half_answer": 0}, "q_pernZjdW": {"answer": 4, "answer_type": "integer", "half_answer": 2}, "q_cJt7i": {"answer": "h", "answer_type": "string", "first_char": "h", "original_string": "which"}}}