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_uPxiED):
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: "high"

Question 1 (Question id: q_QClTkZ):
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: "shapes"

Question 2 (Question id: q_gfAV):
Calculate ( 5 * ( -7 - -7 ) ).

Question 3 (Question id: q_5Vxfk):
Your task is to count how many legs there are in total when given a list of animals.

Now, how many legs are there in total if you have 4 shrimps, 1 giraffe, 2 jellyfishs?
 Respond with an integer.

Question 4 (Question id: q_HC15iP):
Solve for r: 160*r = 1600 Respond with an integer.

Question 5 (Question id: q_7tIC):
Your task is to count how many legs there are in total when given a list of animals.

Now, how many legs are there in total if you have 3 crickets, 3 horses, 4 leechs, 1 shrimp?
 Respond with an integer.

Question 6 (Question id: q_6CHcS):
Calculate 2 - -3.

Question 7 (Question id: q_DaCS9RQ):
Calculate -5 - -4 * 2.



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

Each key’s value must be an object holding an 'answer' field. Additionally, if the task is about counting legs of animals or counting letters in a string, add the task_type field with value 'leg_counting' or 'letter_counting', respectively.
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.
If the question asks for the last character of a string, add an 'original_string' field containing the source string.

Add a top-level 'global_metadata' field that records overall stats:
• num_questions_asked: how many questions were asked in total.
• num_questions_answered: count of questions present in your JSON.
• questions_with_integer_answers – list of question ids whose answers are integers (empty list if none).

Now provide the result JSON using the described format.

{"ground_truth": {"q_7tIC": {"answer": 40, "task_type": "leg_counting", "answer_type": "integer", "half_answer": 20}, "q_DaCS9RQ": {"answer": 3, "answer_type": "integer"}, "q_HC15iP": {"answer": 10, "answer_type": "integer", "half_answer": 5}, "q_gfAV": {"answer": 0, "answer_type": "integer", "half_answer": 0}, "q_6CHcS": {"answer": 5, "answer_type": "integer"}, "q_uPxiED": {"answer": "h", "answer_type": "string", "original_string": "high"}, "q_5Vxfk": {"answer": 44, "task_type": "leg_counting", "answer_type": "integer", "half_answer": 22}, "global_metadata": {"num_questions_asked": 8, "num_questions_answered": 7, "questions_with_integer_answers": ["q_7tIC", "q_DaCS9RQ", "q_HC15iP", "q_gfAV", "q_6CHcS", "q_5Vxfk"]}}}