'''
Created on 20-Jan-2022

@author: bthakur
'''

import inspect
import traceback
import random
import numpy as np
from sympy import (latex, Symbol, symbols,
                   Eq, Rational,
                   UnevaluatedExpr as ueval,
                   )

from xv.util import toIntOrFloat, listAttr
from xv.km.storeddata import BaseStoredQuestions
from xv.km import CustomLogarithm as Log
from xv.km.util import latex_log, latex_fraction, latex_exponent

# _grade3_stored_questions
# Grade3StoredQuestions

class Grade3StoredQuestions(BaseStoredQuestions):
    _QUESTION_KEYWORDS = None
    
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        pass
       
    def get_question_inequality(self):
        keywords = [
            'grade3',
            'grade 3',
            'inequality',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Compare.
        $\displaystyle \frac{{6}}{{4}} \quad ? \quad \frac{{4}}{{4}}$
        Choose 1 answer:
        (A) $<$
        (B) $>$
        (C) $=$
        """
        
        soln_s = rf"""
        $\displaystyle \frac{{6}}{{4}} \quad > \quad \frac{{4}}{{4}}$
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\displaystyle \frac{{6}}{{4}} \quad > \quad \frac{{4}}{{4}}$
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_fraction_word_problem(self):
        keywords = [
            'grade3',
            'grade 3',
            'fraction_word_problem',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        There are 3 balls outside during recess. 2 of the balls are soccer balls.
        What fraction of balls are soccer balls?
        Choose 1 answer:
        (A) 3 halves
        (B) 2 thirds
        (C) 3 thirds
        (D) 2 halves
        """
        
        soln_s = rf"""
        There are 3 balls.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/475d3b440e21f3b5ad2c063496448f09d49f8611.svg">

        2 of the balls are soccer balls.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/3ab1f5e206d806e64530ab092423e4ac7d3bee02.svg">

        2 thirds of the balls are soccer balls.
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        2 thirds of the balls are soccer balls.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_even_numbers(self):
        keywords = [
            'grade3',
            'grade 3',
            'even_numbers',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        The hundred chart has the even numbers shaded.
        Even numbers (sometimes/always/never) have a $2,4,6,8$, or 0 in the tens place.
        $\begin{{array}}{{|c|c|c|c|c|c|c|c|c|c|}}
        \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
        \hline 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \\
        \hline 21 & 22 & 23 & 24 & 25 & 26 & 27 & 28 & 29 & 30 \\
        \hline 31 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 & 40 \\
        \hline 41 & 42 & 43 & 44 & 45 & 46 & 47 & 48 & 49 & 50 \\
        \hline 51 & 52 & 53 & 54 & 55 & 56 & 57 & 58 & 59 & 60 \\
        \hline 61 & 62 & 63 & 64 & 65 & 66 & 67 & 68 & 69 & 70 \\
        \hline 71 & 72 & 73 & 74 & 75 & 76 & 77 & 78 & 79 & 80 \\
        \hline 81 & 82 & 83 & 84 & 85 & 86 & 87 & 88 & 89 & 90 \\
        \hline 91 & 92 & 93 & 94 & 95 & 96 & 97 & 98 & 99 & 100 \\
        \hline
        \end{{array}}$
        """
        
        soln_s = rf"""
        Let's look at the digits in the tens place of the even numbers.
        The digits in the tens place of the even numbers are $0,1,2,3,4,5,6,7,8$ and 9 .
        Even numbers sometimes have a $2,4,6,8$, or 0 in the tens place.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Even numbers sometimes have a $2,4,6,8$, or 0 in the tens place.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_estimate_subtract(self):
        keywords = [
            'grade3',
            'grade 3',
            'estimate_subtract',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Estimate.
        $532-104 \approx$
        Choose 1 answer:
        (A) 190
        (B) 430
        (C) 270
        (D) 720
        """
        
        soln_s = rf"""
        Let's estimate the difference by rounding the numbers in the problem:
        $\begin{{aligned}} & 532-104 \\ \approx & 530-100 \\ \approx & 430 \end{{aligned}}$

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $532-104 \approx 430$
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_division_word_problem(self):
        keywords = [
            'grade3',
            'grade 3',
            'division_word_problem',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        I put 50 sheets of paper in my binder 8 days ago. I used the same number of sheets each day. Now I only have 2 sheets left.
        How many sheets of paper did I use each day?
        """
        
        soln_s = rf"""
        I used $50-2=48$ sheets. 
        $48 \div 8=6$
        I used 6 sheets each day.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        I used 6 sheets each day.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_fraction_number_line(self):
        keywords = [
            'grade3',
            'grade 3',
            'fraction_number_line',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        TODO fraction_number_line
        What fraction is located at Point A on the number line?

        """
        
        soln_s = rf"""
        Each whole has 8 equal parts, so each part has a length of $\frac{1}{8}$
        We need to move $\frac{1}{8}$ on the number line 3 times to reach the point.
        Point $A$ is located at $\frac{3}{8}$

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Point $A$ is located at $\frac{3}{8}$
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_number_line(self):
        keywords = [
            'grade3',
            'grade 3',
            'number_line',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        TODO number_line
        What fraction is located at Point A on the number line?

        """
        
        soln_s = rf"""
        fix solution
        Point A shows 116 on the number line.
        Now, let's look at the hundreds.
        116 is between 100 and 200 but closer to 100. So, 116 rounds down to 100.

        Point A shows 116 on the number line.
        116 is rounded to the nearest hundred is 100.
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Point A shows 116 on the number line.
        116 is rounded to the nearest hundred is 100.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_product_of_even_numbers(self):
        keywords = [
            'grade3',
            'grade 3',
            'product_of_even_numbers',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        What is the product of an even number times an even number?
        Choose 1 answer:
        (A) Always odd
        (B) Always even
        (C) Can be even or odd
        """
        
        soln_s = rf"""
        
        An even number is a multiple of 2 . It can be split into 2 equal groups.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/aabfa194cb98deeb36662094cc4a5d346352690d.svg">
        $2,4,6,8,10, \ldots$
        An odd number is not a multiple of 2 . It cannot be split into 2 equal groups.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/16f646b767fe9638674729a01bf363eefe0bf29e.svg">
        $1,3,5,7,9, \ldots$
        even number $\times$ even number $=$ even number
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/77440c37a4e602569b16f8b37cb45cb89a0e7195.svg">
        When we multiply by an even number, we make an even number of groups.
        So, the product can be split into 2 equal groups.
        The product will always be even.
        The product of an even number times an even number is always even.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The product of an even number times an even number is always even.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_evaluate_expr(self):
        keywords = [
            'grade3',
            'grade 3',
            'evaluate_expr',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Evaluate.
        $45 \div 5-4=$
        """
        
        soln_s = rf"""
        
        To solve, we have to divide before we subtract.
        $\begin{{aligned}} & 45 \div 5-4 \\=&(45 \div 5)-4 \quad \text {{ Step 1 }}  \\ =&9-4 \quad \text {{ Step 2 }} \\ =&5 \quad \text {{ Step 3 }}
        \end{{aligned}}$
        $45 \div 5-4=5$

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $45 \div 5-4=5$
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_division_word_problem_1(self):
        keywords = [
            'grade3',
            'grade 3',
            'division_word_problem_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Computer World ships 10 computer monitors at one time. The total mass of the shipment is 40 kilograms.
        All of the monitors in the box have the same mass.
        What is the mass of one of the computer monitors?
        """
        
        soln_s = rf"""
        
        The box has 10 monitors.
        The total mass of 10 monitors is 40 kilograms.
        We can find the mass of each monitor by dividing the total number of kilograms ( $40 \mathrm{{~kg}})$ by the number of monitors $(10)$.
        $40 \mathrm{{~kg}} \div 10$ monitors $=4 \mathrm{{~kg}}$ per monitor
        One monitor has a mass of 4 kilograms.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        One monitor has a mass of 4 kilograms.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_area(self):
        keywords = [
            'grade3',
            'grade 3',
            'area',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/42c6fe5b47f30e29c37a11d0e138167765042175.svg">is 1 unit square.
       
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/736653cd974e8581b7c6d56611d047851c4711dc.svg">
        Which expressions can we use to find the area of the rectangle?
        Choose 2 answers:
        (A) $5 \times 7$
        (B) $5 \times 5 \times 5 \times 5 \times 5 \times 5 \times 5$
        (C) $7+7+7+7+7$
        (D) $5 \times 7+5 \times 7$
        """
        
        soln_s = rf"""
        
        The area is the number of unit squares it takes to cover the rectangle.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/736653cd974e8581b7c6d56611d047851c4711dc.svg">
        The rectangle has 5 rows with 7 unit squares per row.
        Repeated addition
        We can find the area by adding the unit squares from each row:
        $\underbrace{{7+7+7+7+7}}_{{5 \text {{ rows }}}}$
        Multiplication
        We can also write repeated addition as multiplication:
        $7+7+7+7+7=5 \times 7$
        We multiply width $\times$ height.
        We can use these expressions to find the area of the rectangle:
        $7+7+7+7+7$
        $5 \times 7$

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $7+7+7+7+7$
        $5 \times 7$
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_time_addition(self):
        keywords = [
            'grade3',
            'grade 3',
            'time_addition',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Abby spends 37 minutes making sidewalk chalk drawings. Abby starts drawing at 2:05 p.m.
        What time does the clock show when Abby finishes drawing?
        Choose 1 answer:
        (A) 
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/3d441736f3fd3b2e15752dba77dd239115aacb19.svg">

        (B)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/f798021f15870135cc8c18fbb8014063768b3e2f.svg">
        
        (C)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/f64672c2e5c930db74e9df1eb199ba21442e7065.svg">

        """
        
        soln_s = rf"""
        
        We start at $2: 05$ when Abby starts drawing.
        To determine what time Abby finishes drawing, we go right 37 minutes from 2:05.
        $2: 10+20$ minutes $=2: 30$
        $2: 30+10$ minutes $=2: 40$
        $2: 40+2$ minutes $=2: 42$
        Abby finished drawing at $2: 42$.
        Which clock shows $2: 42$ ?
        When Abby finishes drawing, the clock shows:
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/f64672c2e5c930db74e9df1eb199ba21442e7065.svg">


        {hint_s.strip()}
        """
        
        answer_s = rf"""
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/f64672c2e5c930db74e9df1eb199ba21442e7065.svg">
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_similar_fraction(self):
        keywords = [
            'grade3',
            'grade 3',
            'similar_fraction',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        What number could replace $p$ below?
        $\begin{{aligned}} &\frac{{p}}{{4}}=\frac{{6}}{{8}} \\ &p=? \end{{aligned}}$

        """
        
        soln_s = rf"""
        
        Let's represent $\frac{{6}}{{8}}$ using a visual model.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/cd23df65b1e4af77c8942458c19802d7cce786be.svg">
        How many fourths will we need to shade to have the same amount shaded as $\frac{{6}}{{8}}$ ?
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/7e80871c564b814eb7b78351eef77bc62e3cd8b8.svg">
        We need to shade 3 fourths.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5df0da1b0d9bf292e9f082ac0357c8b9304834d3.svg">
        $\begin{{aligned}} &\frac{{3}}{{4}}=\frac{{6}}{{8}} \\ &p=3 \end{{aligned}}$

        

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\begin{{aligned}} &\frac{{3}}{{4}}=\frac{{6}}{{8}} \\ &p=3 \end{{aligned}}$
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_area_1(self):
        keywords = [
            'grade3',
            'grade 3',
            'area_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        We can also break the figure into two parts.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/a9b8499e0e295452b4445b2aadd81f1a1bce7b26.svg">

        What are 2 more expressions that represent the area of the entire rectangle?
        Choose 2 answers:
        (A) 2 sixes $+3$ sixes
        (B) $12+18$
        (c) 2 fives $+6$ fives
        (D) $10+30$
        """
        
        soln_s = rf"""
        
        The rectangle has an area of $5 \times 6$, or 5 sixes.
        Let's use the figure to break the 5 sixes into two parts.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/b8bf675b44a0d5efa4f37252b24a461240cf8cbd.svg">
        The area of the top rectangle is 2 sixes or 12 .
        The area of the bottom rectangle is 3 sixes or 18 .
        We get the total area of the rectangle by adding the areas of the two parts.
        The following expressions represent the area of the entire figure:
        $12+18$
        2 sixes $+3$ sixes

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $12+18$
        2 sixes $+3$ sixes

        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_area_2(self):
        keywords = [
            'grade3',
            'grade 3',
            'area_2',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        TODO area_2
        Keshawn drew a rectangle with an area of 18 square units.
        Move the corners of the other figure to make a different rectangle with the same area.
        NO sides should be 9 units long.
        """
        
        soln_s = rf"""
        
        FIX solution
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_subtraction(self):
        keywords = [
            'grade3',
            'grade 3',
            'subtraction',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Ling has read 118 pages of a book. The book has 141 pages.
        How many pages are left?
        """
        
        soln_s = rf"""
        The book has 141 pages. Of those, Ling has read 118 pages, and the rest are left.
        $141-118=?$
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/c8a9c66f6728659a0326482818a0e3308058fd94.svg">
        There are 23 pages left.
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        There are 23 pages left.
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_addition(self):
        keywords = [
            'grade3',
            'grade 3',
            'addition',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Add.
        $568+139=$
        """
        
        soln_s = rf"""
        $8+9=17$
        $10+60+30=100$
        $100+500+100=700$
        $568+139=707$
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $568+139=707$
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_pattern(self):
        keywords = [
            'grade3',
            'grade 3',
            'pattern',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Look at the pattern below:
        $1,3,9,27, \ldots$
        If the pattern continues, what will be the next number in the pattern?
        Choose 1 answer:
        (A) 36
        (B) 54
        (C) 81
        (D) 108
        """
        
        soln_s = rf"""
        Let's find the pattern that connects each number.
        $\underset{{?}}{{\rightarrow}} 3 \underset{{?}}{{\rightarrow}} 9 \underset{{?}}{{\rightarrow}} 27$
        The pattern starts at 1 and multiplies by 3 each time.
        $1 \underset{{\times 3}}{{\rightarrow}} 3 \underset{{\times 3}}{{\rightarrow}} 9 \underset{{\times 3}}{{\rightarrow}} 27$
        So, if we want to know what the next number will be, we need to extend the pattern:
        $1 \underset{{\times 3}}{{\rightarrow}} 3 \underset{{\times 3}}{{\rightarrow}} 9 \underset{{\times 3}}{{\rightarrow}} 3 \underset{{\times 3}}{{\rightarrow}} 27 \underset{{\times 3}}{{\rightarrow}} 81$
        The next number in the pattern will be 81 .

        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The next number in the pattern will be 81 .

        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_division_word_problem_2(self):
        keywords = [
            'grade3',
            'grade 3',
            'division_word_problem_2',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Amy has 16 video games. She puts them into stacks of 4 games each.
        Which expression helps us find out how many stacks of games there are?
        Choose 1 answer:
        (A) $16 \div 4$
        (B) $16 \div 8$
        (C) $4 \div 16$
        """
        
        soln_s = rf"""
        We can think of division as the following:
        Total $\div$ Number of groups $=$ Size of the groups
        Total $\div$ Size of the groups $=$ Number of groups
        We know the total:
        There are 16 video games total.
        And we know the size of the groups:
        There are 4 games per stack.
        To find out how many stacks there are, we can divide 16 video games into groups of 4 . 
        $16 \div 4$

        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $16 \div 4$

        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_measuring_unit_gram(self):
        keywords = [
            'grade3',
            'grade 3',
            'measuring_unit_gram',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Identify the most reasonable unit to measure the mass of a couch.
        Choose 1 answer:
        (A) Grams
        (B) Kilograms
        """
        
        soln_s = rf"""
        A small paperclip has a mass of about 1 gram.
        A wooden baseball bat has a mass of about 1 kilogram.
        Is it more reasonable to measure how many 'paperclips heavy' a couch is or how many 'bats heavy' a couch is?
        Kilograms is the most reasonable unit to measure the mass of a couch.

        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Kilograms is the most reasonable unit to measure the mass of a couch.

        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_complete_equations(self):
        keywords = [
            'grade3',
            'grade 3',
            'complete_equations',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Fill in the blanks to complete the table. Hint: Use the array to help you solve.
        $\begin{{aligned}} 8 \times ?=& 72 \\ 72 \div ?=&8\end{{aligned}}$
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/916f99c8358ead90c01e7e9bc7796fb40dc3e94f.svg">

        """
        
        soln_s = rf"""
        We can relate the array to multiplication and division:
        Number of groups $\times$ size of the group $=$ total
        Size of the group $\times$ number of groups $=$ total
        Total $\div$ number of groups $=$ size of the groups
        Total $\div$ size of the groups $=$ number of groups
        The array has 72 total dots.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/916f99c8358ead90c01e7e9bc7796fb40dc3e94f.svg">
        The dots are in 8 rows of 9 dots.
        8 rows $\times 9$ dots in each row $=72$ total dots
        72 total dots $\div 9$ dots in each row $=8$ rows
        Here is the completed table:
        $\begin{{aligned}} 8 \times 9=& 72 \\ 72 \div 9=&8\end{{aligned}}$
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\begin{{aligned}} 8 \times 9=& 72 \\ 72 \div 9=&8\end{{aligned}}$
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_group(self):
        keywords = [
            'grade3',
            'grade 3',
            'group',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Use the following image to find the total number of otters.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/e39403ab5f0b88a6a5127b873be085c3f0346da3.svg">
        6 groups of $2=$
        $6 \times 2=$
        """
        
        soln_s = rf"""
        There are 6 groups of 2 .
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/e39403ab5f0b88a6a5127b873be085c3f0346da3.svg">
        So, let's skip count by two 6 times to find the total.
        $2,4,6,8,8,10,12$
        6 groups of $2=12$
        We can also express 6 groups of 2 using multiplication.
        6 groups of $2=6 \times 2$
        6 groups of $2=12$
        $6 \times 2=12$
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        6 groups of $2=12$
        $6 \times 2=12$
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_bar_graph(self):
        keywords = [
            'grade3',
            'grade 3',
            'bar_graph',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        TODO bar_graph


        The public library gives a bookstore gift certificate as a prize to the student who reads the most books over summer vacation.
        Create a bar graph to show how many books each student read.    
        """
        
        soln_s = rf"""
        
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_multiply(self):
        keywords = [
            'grade3',
            'grade 3',
            'bar_graph',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        $2 \times 5 = $
        """
        
        soln_s = rf"""
        We can think of $2 \times 5$ as 2 rows of 5 circles. How many circles are there?
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/fec1c70b2ca5e71c65f2d20cb242acb235aaeafa.svg">
        $2 \times 5=10$
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $2 \times 5=10$
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_multiply_word_problem(self):
        keywords = [
            'grade3',
            'grade 3',
            'multiply_word_problem',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        A volunteer group is planting trees at 5 different parks. They planted 90 trees at each park.
        How many trees did the group plant in all?
        """
        
        soln_s = rf"""
        $90$ trees is the same as 9 groups of ten trees.
        There are 5 parks.
        Total number of trees:
        $5 \times 9$ groups of ten
        $=45$ groups of ten $=450$
        The group planted 450 trees.
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The group planted 450 trees.
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_area_3(self):
        keywords = [
            'grade3',
            'grade 3',
            'area_3',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        TODO area_3
        Which rectangle has the greatest area?
        Choose 1 answer:


        """
        
        soln_s = rf"""
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_SAMPLE(self):
        keywords = [
            'grade3',
            'grade 3',
            ]
        
        hint_s = rf"""
        <b>:</b>
        
        """
        
        prob_s = rf"""

        """
        
        soln_s = rf"""

        
        {hint_s.strip()}

        """
        
        answer_s = rf"""
        
        
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass
    pass
#class Grade3StoredQuestions:
