'''
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

# _grade2_stored_questions
# Grade2StoredQuestions

class Grade2StoredQuestions(BaseStoredQuestions):
    _QUESTION_KEYWORDS = None
    
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        pass
       
    def get_question_tens_to_ones(self):
        keywords = [
            'grade2',
            'grade 2',
            'tens_to_ones',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Write a number that makes this equation true.
        10 tens $=$ ? ones
        """
        
        soln_s = rf"""
        Let's use place value blocks to help us solve!
        There are 10 tens.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5ead4ca07be312ae08bd6a4a71fe55a9ec49248d.svg">
        If we break apart one ten into ones, we will see that 1 ten $=10$ ones.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/fb3aac10c5db3c91222d9ac894dfd5751ee3c7d6.svg">
        Next, let's break apart each ten until we have only ones.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/93dfb9d2b0f96c63b38709ba289268d2b6fcc6ca.svg">
        There are 100 ones.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/e4e2cee71b2900407f22ce1de26734b960302a83.svg">
        10 tens $=$ 100 ones 
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        10 tens $=$ 100 ones 
        """

        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_word_problem(self):
        keywords = [
            'grade2',
            'grade 2',
            'addition_word_problem',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Maria has 50 Star stickers, 33 Moon stickers, and 11 Earth stickers.
        How many total stickers does Maria have?
        
        """
        # <a target="_blank" href="https://artofproblemsolving.com/wiki/index.php/2020_AMC_8_Problems">https://artofproblemsolving.com/wiki/index.php/2020_AMC_8_Problems</a>
        
        soln_s = rf"""
        Maria has 50 star stickers and 33 moon stickers.
        $50+33=83$
        Maria still has 11 Earth stickers.
        $83+11=94$
        Maria had 94 total stickers.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Maria had 94 total stickers.
        """

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

    def get_question_height_block_tower(self):
        keywords = [
            'grade2',
            'grade 2',
            'height_block_tower',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        This line has a height of 1 centimeter:
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/1f0d2e01aab1c441aa52507b0e2ba2f34c140c36.svg">
        Look at the block tower below.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/c3eb60bfe25a88300249332b87220d11c8fa268d.svg">
        About how tall is the block tower?
        Choose 1 answer:
        (A) 10 centimeters
        (B) 1 centimeter
        (C) 4 centimeters
        """
        
        soln_s = rf"""
        Each block is about 1 centimeter tall
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/c3eb60bfe25a88300249332b87220d11c8fa268d.svg">
        The block tower has 4 blocks.
        The block tower is about 4 centimeters tall.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/83f1580cbb9660e81dcb2d3d23638f74d8d0a953.svg">

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The block tower is about 4 centimeters tall.
        """

        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_the_equations(self):
        keywords = [
            'grade2',
            'grade 2',
            'complete_the_equations',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Complete to solve $27+46$.
        $\begin{{aligned}} &27+46 \\ &=27+(?+43) \\ &=(27+?)+43 \\ &=?+43 \\ & = \end{{aligned}}$

        """
        
        soln_s = rf"""
        We can break apart the number 46 .
        $\begin{{aligned}} & 27+46 \\ =& 27+(3+43) \end{{aligned}}$
        Next, we can shift the parentheses to be around the $27+3$.
        $\begin{{aligned}} & 27+46 \\ =& 27+(3+43) \\ =&(27+3)+43 \end{{aligned}}$
        Now, lets add $27+3$,
        $27+46$
        $=27+(3+43)$
        $=(27+3)+43$
        $=30+43$
        Last, let's add $30+43$
        $\begin{{aligned}} & 27+46 \\ =& 27+(3+43) \\ =&(27+3)+43 \\ =& 30+43 \\ =& 73 \end{{aligned}}$
        Here is completed set of equations:
        $27+46$
        $\begin{{aligned}} &=27+(3+43) \\ &=(27+3)+43 \\ &=30+43 \\ &=73 \end{{aligned}}$

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\begin{{aligned}} &=27+(3+43) \\ &=(27+3)+43 \\ &=30+43 \\ &=73 \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_complete_the_equations_1(self):
        keywords = [
            'grade2',
            'grade 2',
            'complete_the_equations_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Complete the equations.
        $354=3$ hundreds $+\quad 5$ tens $+\quad 4$ ones
        $354=0$ hundreds $+\quad ?$ tens $+\quad 4$ ones
        $354=0$ hundreds $+\quad 0$ tens $+\quad ?$ ones
        """
        
        soln_s = rf"""
        Let's use place value blocks to help us solve!
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/a38fce76f4bf7b902c5c4e0202089095fea34ebe.svg">
        $354=3$ hundreds $+5$ tens $+4$ ones
        If we break apart one hundred into tens, we will see that 1 hundred $=10$ tens.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/8c372c3bcf29ff756e7c045ec7186ec8af75d650.svg">
        So, 1 hundred $=10$ tens
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/7274bdecc82e2f72fead766d172fcb5a6e37baef.svg">
        30 tens $+5$ tens $+4$ ones $=35$ tens $+4$ ones
        If we break apart one ten into ones, we will see that 1 ten $=10$ ones.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/e4fdf448967cc3f80b9adac27e4758efcc081e2c.svg">
        So, 35 tens $=350$ ones.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/98fe41af78868b7d8084868a131b096cdc6249a3.svg">
        350 ones $+4$ ones $=354$ ones
        Here is the completed equations:
        $354=3$ hundreds $+\quad 5$ tens $+\quad 4$ ones
        $354=0$ hundreds $+\quad 35$ tens $+\quad 4$ ones
        $354=0$ hundreds $+\quad 0$ tens $+\quad 354$ ones
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $354=3$ hundreds $+\quad 5$ tens $+\quad 4$ ones
        $354=0$ hundreds $+\quad 35$ tens $+\quad 4$ ones
        $354=0$ hundreds $+\quad 0$ tens $+\quad 354$ ones
        """

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

    def get_question_quadrilateral(self):
        keywords = [
            'grade2',
            'grade 2',
            'quadrilateral',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        How many sides does a quadrilateral have?
        Choose 1 answer:
        (A) 4 sides
        (B) 6 sides
        (C) 8 sides
        """
        
        soln_s = rf"""
        Let's draw a quadrilateral!
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/bae70756110c9a87930b25783f67646fc0d17c57.svg">
        How many sides are there?
        There are 4 sides.
        A quadrilateral has 4 sides.
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        A quadrilateral has 4 sides.
        """

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

    def get_question_word_to_number(self):
        keywords = [
            'grade2',
            'grade 2',
            'word_to_number',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        What is "one hundred seventy-two" in number form?
        """
        
        soln_s = rf"""
        "One hundred seventy-two" in number form is 172.
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        "One hundred seventy-two" in number form is 172.
        """

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

    def get_question_shaded_area(self):
        keywords = [
            'grade2',
            'grade 2',
            'shaded_area',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Which rectangle shows three thirds of the shape shaded?
        Choose all answers that apply:
        (A)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/7ac9eca57676a775298749a450f8d486911ab418.svg">
        (B)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/57d8e96e56dcced0061c2f4a994c4cd9006787a5.svg">
        (C)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/44f9a1cd19242b4240dc6975433a8470906a7b27.svg">
        (D)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/b0c1b0782685779b2c7b84eb77d5e1d269461874.svg">
        """
        
        soln_s = rf"""
        This rectangle is split into 3 equal-sized pieces, or thirds, with 2 pieces shaded.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/57d8e96e56dcced0061c2f4a994c4cd9006787a5.svg">
        The rectangle has two thirds of the shape shaded.
        This rectangle is not split into equal-sized pieces.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/b0c1b0782685779b2c7b84eb77d5e1d269461874.svg">
        This rectangle is split into 3 equal-sized pieces, or thirds, with 1 piece shaded.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/44f9a1cd19242b4240dc6975433a8470906a7b27.svg">
        The rectangle has one third of the shape shaded.
        This rectangle is split into 3 equal-sized pieces, or thirds, with 3 piece shaded.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/7ac9eca57676a775298749a450f8d486911ab418.svg">
        This rectangle has three thirds of the shape shaded.
        This rectangle has three thirds of the shape shaded:
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/7ac9eca57676a775298749a450f8d486911ab418.svg">
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        This rectangle has three thirds of the shape shaded:
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/7ac9eca57676a775298749a450f8d486911ab418.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_addition_word_problem_1(self):
        keywords = [
            'grade2',
            'grade 2',
            'addition_word_problem_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        A group of friends graphed how many dollars they earned mowing grass.
        How many dollars do the friends have all together?
        """
        
        soln_s = rf"""
        To find the total number of dollars, let's start by finding the number of dollars that each friend made.
        $\begin{{array}}{{ll}} 
        \text{{Name}} & \text{{Dollars}} \\
        \hline 
        \text{{Betsy}} & 10 \text{{ dollars}} \\
        \text{{Bobby}} & 7  \text{{ dollars}} \\
        \text{{Billy}} & 5  \text{{ dollars}} \\
        \text{{Bella}} & 12 \text{{ dollars}}
        \end{{array}}$
        Now, let's add the number of dollars each friend earned together. $10+7+5+12=?$
        All together, they earned 34 dollars.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        They earned 34 dollars.
        """

        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 = [
            'grade2',
            'grade 2',
            'addition',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Add.
        $917+70$
        """
        
        soln_s = rf"""
        $\begin{{array}}{{rl}} &917+70 \\ & =900+10+7+70 \\ & =900+10+70+7 \\ & =900+80+7 \\ 917+70 &=987 \end{{array}}$

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $917+70 =987$
        """

        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_word_problem_2(self):
        keywords = [
            'grade2',
            'grade 2',
            'addition_word_problem_2',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        A dirt bike shop sold 51 tires today. At the end of the day, the store only has 11 tires left.
        How many tires did the dirt bike shop have at the beginning of the day?
        """
        
        soln_s = rf"""
        To find the total number of tires the store had to start with, we start with the number of Tires sold, and add the number of Tires left over.
        Total tires
        $51+11=$
        Let's add to find the total number of tires.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5d632c993419a677684fae2f55ce1bf5de0ce7b5.svg">
        $51+11=62$
        The dirt bike shop had 62 tires before the sale.
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The dirt bike shop had 62 tires before the sale.
        """

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

    def get_question_coin_value(self):
        keywords = [
            'grade2',
            'grade 2',
            'coin_value',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Which coin is worth 5¢?
        Choose 1 answer:
        (A)
        <img src="https://cdn.kastatic.org/ka-perseus-images/7955b6e1dd4121d5d6c7ed603e66a45f6eafb5d1.png">
        (B)
        <img src="https://cdn.kastatic.org/ka-perseus-images/e9d1f7fdf01d8d6120bd3999603aeb9701bddf11.png">
        (C)
        <img src="https://cdn.kastatic.org/ka-perseus-images/9566e98639679a6a77950c7280a455c3d8f80e15.png">
        (D)
        <img src="https://cdn.kastatic.org/ka-perseus-images/29f5b5333d83fe2e7dd4c6b6ed7a7c33a5f0f192.png">
        """
        
        soln_s = rf"""
        Every coin has a different value.
        Which coin is worth 5 ¢?
        The nickel is worth 5 ¢.
        This image shows a nickel:
        <img src="https://cdn.kastatic.org/ka-perseus-images/e9d1f7fdf01d8d6120bd3999603aeb9701bddf11.png">
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        <img src="https://cdn.kastatic.org/ka-perseus-images/e9d1f7fdf01d8d6120bd3999603aeb9701bddf11.png">
        """

        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_number(self):
        keywords = [
            'grade2',
            'grade 2',
            'even_number',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Which coin is worth 5¢?
        Choose 1 answer:
        (A)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5cad2b898ca9d8342467ea6144f3941b6c6d0de1.svg">
        (B)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5082127df826530adec93509402742eaecb98c14.svg">
        (C)
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/9eada5a8349ac4cb0f7a3ec4a7436caa87871d24.svg">
        """
        
        soln_s = rf"""
        
        An even number is a number that can be split into 2 equal groups.
        We find even numbers by making sure every object in the group has a pair.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/9d50cd961bb1ee962eb60cc708a5e737e9d4486c.svg">
        Examples of even numbers are $2,4,6,8,10, \ldots$
        An odd number cannot be split into 2 equal groups.
        We find odd numbers by trying to pair objects and finding there is not always a pair.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/10c3af09ebfcd0c6d05b4edd219f33894cc4d8b9.svg">
        Examples of odd numbers are $1,3,5,7,9, \ldots$
        In this image, there are 9 cheese triangles.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/f43b4da0a1cdc117dcb33e878cb9411e87c07af7.svg">
        Each cheese triangle does not have a pair, so there are an odd number of cheese triangles.
        In this image, there are 11 cheese triangles.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/27b48a7fdf2c958a0d8d5a83a4a7a92b3dd0f75a.svg">
        Each cheese triangle does not have a pair, so there are an odd number of cheese triangles.
        In this image, there are 10 cheese triangles.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/6c05692f73bd892e6f6cf75d47f8b461c2264f3d.svg">
        Each cheese triangle has a pair, so there are an even number of cheese triangles.
        This image shows an even number of cheese triangles:
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5cad2b898ca9d8342467ea6144f3941b6c6d0de1.svg">
        
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5cad2b898ca9d8342467ea6144f3941b6c6d0de1.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_inequality(self):
        keywords = [
            'grade2',
            'grade 2',
            'inequality',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Compare using $>,<$, or $=$
        483 ? 283+100+10
        """
        
        soln_s = rf"""
        
        $<$ means "less than".
        $=$ means "equal to".
        $>$ means "greater than"
        
        $483=4$ hundreds $+8$ tens $+3$ ones
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/e3feb290eca07d7c3d9076fd80ea0c7041da130b.svg">

        $283+100+10=2$ hundreds $+1$ hundred $+8$ tens $+1$ ten $+3$ ones
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5e800462dee65811314cb79c4f54f4a64acb6434.svg">

        $283+100+10=393$
        $\underline{{4}}83$ is greater than $\underline{{3}} 93$.
        $\begin{{aligned}} &483>393 \\ &483>283+100+10 \end{{aligned}}$

        
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $483>283+100+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_length_rectangle(self):
        keywords = [
            'grade2',
            'grade 2',
            'length_rectangle',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        The length of a rectangle is measured in small paper clips and in centimeters.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/fdc81d579b15ec415f1989fc038de8457b9764b6.svg">
        The rectangle is ________ small paperclips long.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/4a2a35351a2fa9b115e23bbd18a4edd81aa1a0b5.svg">
        The rectangle is ________ centimeters long.
        """
        
        soln_s = rf"""
        Let's measure the length of the rectangle in small paperclips and centimeters.
        The rectangle starts at the beginning of 1 small paperclip and ends after 10 small paperclips.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/fdc81d579b15ec415f1989fc038de8457b9764b6.svg">
        The length of the rectangle is 10 small paperclips.
        On the ruler, the rectangle starts at $0 \mathrm{{~cm}}$ and ends at $5 \mathrm{{~cm}}$.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/4a2a35351a2fa9b115e23bbd18a4edd81aa1a0b5.svg">
        The length of the rectangle is 5 centimeters.
        The length of the rectangle is 10 small paperclips and 5 centimeters.


        
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The length of the rectangle is 10 small paperclips and 5 centimeters.
        """

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

    def get_question_tall_umbrella(self):
        keywords = [
            'grade2',
            'grade 2',
            'tall_umbrella',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Which is the closest to how tall an umbrella is?
        Choose 1 answer:
        (A) 75 centimeters
        (B) 75 meters
        """
        
        soln_s = rf"""
        Is an umbrella closer to 75 centimeters tall or 75 meters tall?
        An umbrella is about 75 centimeters tall.
        
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        An umbrella is about 75 centimeters tall.
        """

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

    def get_question_identify_shape(self):
        keywords = [
            'grade2',
            'grade 2',
            'identify_shape',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        How can we classify the following shape?
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/3ae67eaf69a6315e8212a9e6843ca7b825ea6a45.svg">
        Choose 1 answer:
        (A) Trapezoid
        (B) Triangle
        (C) Rhombus
        (D) None of the above
        """
        
        soln_s = rf"""
        Let's look at each name to see which ones can classify our shape.

        Trapezoid
        A trapezoid is a quadrilateral with exactly one pair of parallel sides.
        The shape is not a quadrilateral, so it is not a trapezoid.

        Triangle
        A triangle is a polygon with 3 sides.
        The shape has 3 sides, so it is a triangle.

        Rhombus
        Rhombuses are quadrilaterals with 4 sides of equal length.
        The shape is not a quadrilateral, so it is not a rhombus.

        The following names can classify the shape:
        Triangle
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Triangle
        """

        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 = [
            'grade2',
            'grade 2',
            'subtraction',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Subtract.
        $908-600=$
        """
        
        soln_s = rf"""
        $\begin{{aligned}} & 908-600 \\=& 900+8-600 \\=& 900-600+8 \\=& 300+8 \end{{aligned}}$
        $908-600=308$


        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $908-600=308$
        """

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

    def get_question_word_to_expanded_form(self):
        keywords = [
            'grade2',
            'grade 2',
            'word_to_expanded_form',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Write "nine hundred one" in expanded form.
        Choose 1 answer:
        (A) $900+1$
        (B) $900+10+1$
        (C) $900+10$

        """
        
        soln_s = rf"""
        Let's use a place value chart to write nine hundred one in standard form.
        $\begin{{array}}{{ccc}} 
        \text{{Hundreds}} & \text{{Tens}} & \text{{Ones}} \\
        \hline 9 & 0 & 1
        \end{{array}}$
        Now, let's turn 901 into expanded form.
        9 hundreds $=900$
        0 tens $=0$
        1 one $=1$
        $900+1$
        Nine hundred one in expanded form is $900+1$.


        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Nine hundred one in expanded form is $900+1$.
        """

        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 = [
            'grade2',
            'grade 2',
            'area',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Saige splits the following rectangle into 4 rows and 5 columns.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/930775e6cd1c9ff431384818c7823655490cce5c.svg">
        How many total same-sized squares did Saige make?


        """
        
        soln_s = rf"""
        Let's split the rectangle into 4 same-sized rows.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/1850cdf3cf0ccf67cb8060d4e85b4eee02ab9ad0.svg">
        Now, let's split the rectangle into 5 same-sized columns.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/f6fe67a4d2950dfb8e067960074537a22aac3bc0.svg">
        Last, let's count the total same-sized squares.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/8788222580ac7390e0640424aa318bb004946334.svg">
        Saige made 20 same-sized squares.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Saige made 20 same-sized squares.
        """

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

    def get_question_expanded_form(self):
        keywords = [
            'grade2',
            'grade 2',
            'expanded_form',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Which expression is equivalent to 18 ?
        Choose 1 answer:
        (A) $10+80$
        (B) $10+8$
        (C) $100+8$

        """
        
        soln_s = rf"""
        Let's use a place value chart to write 18 in expanded form.
        $\begin{{array}}{{ccc}} 
        \text{{Hundreds}} & \text{{Tens}} & \text{{Ones}} \\
        \hline 0 & 1 & 8    
        \end{{array}}$
        Now, let's turn 901 into expanded form.
        0 hundreds $=0$
        1 tens $=10$
        8 ones $=8$
        $18 = 10+8$
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $18 = 10+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_addition_word_problem_3(self):
        keywords = [
            'grade2',
            'grade 2',
            'addition_word_problem_3',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Nancy measures the heights of different trees in the forest.
        $\begin{{array}}{{ll}} 
        \text{{Tree}} & \text{{Height}} \\
        \hline 
        \text{{Maple}} & 52 \mathrm{{ft}} \\
        \text{{Red pine}} & 75 \mathrm{{ft}} \\
        \text{{Aspen}} & 39 \mathrm{{ft}}
        \end{{array}}$
        What is the height of the Maple tree and Aspen tree combined?


        """
        
        soln_s = rf"""
        To find how tall the Maple tree and Aspen tree are together, we need to find the total. So, we add.
        52 feet $+39$ feet $= ?$ feet
        Let's add to find the total.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/d74d805eca7f477fac4bc355bf21bccd3d048657.svg">
        52 feet $+39$ feet $=91$ feet
        The maple and aspen tree measure $91 \mathrm{{ft}}$ combined.

        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The maple and aspen tree measure $91 \mathrm{{ft}}$ combined.
        """

        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_word_problem(self):
        keywords = [
            'grade2',
            'grade 2',
            'subtraction_word_problem',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Sam rode a bull for 8 seconds.
        Maddie rode a bull for 2 fewer seconds than Sam did.
        How long did Maddie ride her bull?

        """
        
        soln_s = rf"""
        To find the number of seconds Maddie rode the bull, we start with the number of seconds Sam rode the bull and subtract 2 seconds.
        $8-2=$
        Let's subtract to find how many seconds Maddie rode the bull.
        $8-2=6$
        Maddie rode her bull for 6 seconds.
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Maddie rode her bull for 6 seconds.
        """

        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 = [
            'grade2',
            'grade 2',
            ]
        
        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 Grade2StoredQuestions:
