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

# _grade5_stored_questions
# Grade5StoredQuestions

class Grade5StoredQuestions(BaseStoredQuestions):
    _QUESTION_KEYWORDS = None
    
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        pass
       
    def get_question_decimal(self):
        keywords = [
            'grade5',
            'grade 5',
            'decimal',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Fill in the table with whole numbers to make $2.8$ in three different ways.
		$\begin{{array}}{{cccc}}
		\text{{Ones}} & . & \text{{Tenths}} \\
		\hline
		2 & . & 8  \\
		  & . & 18 \\
		0 & . &    \\
		\end{{array}}$
		"""
        
        soln_s = rf"""
        $2.8$ is 2 ones and 8 tenths.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5e96080d0d333bc94e2ef7e22fe23735c85033db.svg">
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5e96080d0d333bc94e2ef7e22fe23735c85033db.svg">
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/83aca45489af35d0ca9099edf4bcf2983862f8f6.svg">

        We need 18 tenths.
        10 tenths $=1$ one
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/5e96080d0d333bc94e2ef7e22fe23735c85033db.svg">
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/2f6a43c3ef98bb5fa069a730409ca3e2e3336100.svg">
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/83aca45489af35d0ca9099edf4bcf2983862f8f6.svg">
        $\begin{{array}}{{cccc}}
		\text{{Ones}} & . & \text{{Tenths}} \\
		\hline
		2 & . & 8  \\
		1 & . & 18 \\
		\end{{array}}$
        
        Now, we need to move 2 ones to our tenths place value column.
        1 one $=10$ tenths
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/2f6a43c3ef98bb5fa069a730409ca3e2e3336100.svg">
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/2f6a43c3ef98bb5fa069a730409ca3e2e3336100.svg">
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/83aca45489af35d0ca9099edf4bcf2983862f8f6.svg">
        $\begin{{array}}{{cccc}}
		\text{{Ones}} & . & \text{{Tenths}} \\
		\hline
		2 & . & 8  \\
		1 & . & 18 \\
		0 & . & 28 \\
		\end{{array}}$
		
        Here is the completed table:
        $\begin{{array}}{{cccc}}
		\text{{Ones}} & . & \text{{Tenths}} \\
		\hline
		2 & . & 8  \\
		1 & . & 18 \\
		0 & . & 28 \\
		\end{{array}}$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\begin{{array}}{{cccc}}
		\text{{Ones}} & . & \text{{Tenths}} \\
		\hline
		2 & . & 8  \\
		1 & . & 18 \\
		0 & . & 28 \\
		\end{{array}}$
		
		"""

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

    def get_question_frequency(self):
        keywords = [
            'grade5',
            'grade 5',
            'frequency',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        TODO frequency

        Gino records how much milk his family drinks each week in February.
		$\begin{{array}}{{cc}} 
		\text{{Week}} & \text{{Milk (gal)}} \\
		\hline 1 & 3 \frac{{3}}{{4}} \\
		2 & 2 \frac{{1}}{{4}} \\
		3 & 3 \frac{{3}}{{4}} \\
		4 & 1 \frac{{1}}{{2}}
		\end{{array}}$
		Create a line plot that shows all of the measurements on the number line below. Click above tick marks to add dots; click on tick marks to remove dots.
		
        """
        
        soln_s = rf"""
        FIX solution


        There are repeats in the data. Let's summarize the information into a frequency table.
		$\begin{{array}}{{cc}} 
		\text{{Milk (gal)}} & \text{{Frequency}} \\
		\hline 3 \frac{{3}}{{4}} & 2 \\
		2 \frac{{1}}{{4}} & 1 \\
		1 \frac{{1}}{{2}} & 1
		\end{{array}}$
		The frequency tells us how many dots to put above each number on the line plot. For example, we need 2 dots above the value $3 \frac{{3}}{{4}}$ gallons.
		Now we can plot each volume and its frequency.
		The correctly graphed measurements are:
		
		
        {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_fraction(self):
        keywords = [
            'grade5',
            'grade 5',
            'fraction',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Liz ran $\frac{{4}}{{5}} \mathrm{{~km}}$ on Monday and $\frac{{5}}{{6}} \mathrm{{~km}}$ on Tuesday.
		Select the true statement about the distance Liz ran.
		Choose 1 answer:
		(A) Both fractions are almost 1 whole.
		(B) One fraction is about $\frac{{1}}{{2}}$ and the other is less than $\frac{{1}}{{2}}$.
		
		Select the best estimate for the combined distance Liz ran Monday and Tuesday.
		Choose 1 answer:
		(A) $\frac{{1}}{{2}} \mathrm{{~km}}$
		(B) $1 \mathrm{{~km}}$
		(C) $2 \mathrm{{~km}}$
		
        """
        
        soln_s = rf"""
        FIX solution
        We can make an estimate by picturing each fraction:
		<img src="https://cdn.kastatic.org/ka-perseus-graphie/6e7095a751f15bbd938e578646006d2e217a2022.svg">
		Both $\frac{{4}}{{5}}$ and $\frac{{5}}{{6}}$ are almost 1 whole.
		To find the combined distance Liz ran Monday and Tuesday, we need to add $\frac{{4}}{{5}}$ and $\frac{{5}}{{6}}$.
		<img src="https://cdn.kastatic.org/ka-perseus-graphie/655fbdda8182a7414a533d4705ef8edead057aeb.svg">
		We can compare our sum to benchmarks like $\frac{{1}}{{2}}$ and 1 :
		<img src="https://cdn.kastatic.org/ka-perseus-graphie/c235c00b3bf8889d9fc3bab5b97f60b49b52991b.svg">
		Our sum is about 2 .
		Both fractions are almost 1 whole.
		$2 \mathrm{{~km}}$ is a reasonable estimate for the combined distance Liz ran Monday and Tuesday.
		
		
        {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_division(self):
        keywords = [
            'grade5',
            'grade 5',
            'division',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Divide.
        $125 \div 14$
        quotient = 
        remainder = 

        """
        
        soln_s = rf"""
        $125 \div 14=?$
		So, $14 \times ?=125$
		Let's estimate first using friendly numbers.
		$14 \times ?=125$ is close to $15 \times ?=120$.
		$15 \times 8=120$
		So, $14 \times 8 \approx 125$
		From our estimation, we know the quotient is about 8 .
		So, let's multiply 8 times 14 to see how close the product is to 125 . $8 \times 14=112$
		We only need 13 more to equal 125 .
		Since 13 is less than 14 , our quotient is 8 and our remainder is 13. 
		$125 \div 14=8$ remainder 13
		
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $125 \div 14$
		quotient = 8
        remainder = 13

		"""

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

    def get_question_decimal_subtraction(self):
        keywords = [
            'grade5',
            'grade 5',
            'decimal_subtraction',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Estimate.
        $39.06-21.13 \approx$
        Choose 1 answer:
        (A) 9
        (B) 12
        (C) 15
        (D) 18
        """
        
        soln_s = rf"""
        We estimate to add, subtract, multiply, and divide with friendly numbers.
        $39.06$ is about 39 .
        $39.06 \approx 39$
        $21.13$ is about 21 .
        $21.13 \approx 21$
        $39-21=18$
        $39.06-21.13 \approx 18$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $39.06-21.13 \approx 18$


		"""

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

    def get_question_plot_point(self):
        keywords = [
            'grade5',
            'grade 5',
            'plot_point',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Plot the point (5,1)
        """
        
        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_decimal_division(self):
        keywords = [
            'grade5',
            'grade 5',
            'decimal_division',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Divide.
        Hint: Use the number line below to divide $0.42$ into 3 equal-sized groups.
        $0.42 \div 3=$
        """
        
        soln_s = rf"""
        $0.42 \div 3=0.14$
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $0.42 \div 3=0.14$

		"""

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

    def get_question_decimal_division_1(self):
        keywords = [
            'grade5',
            'grade 5',
            'decimal_division_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Divide.
        $84 \div 0.1=$
        """
        
        soln_s = rf"""
        There are many ways to solve this problem. Let's see two ways we could divide.

        Place value strategy
        We can think in terms of tenths:
		$\begin{{aligned}} 84 \div 0.1 &=84.0 \div 0.1 \\ &=840 \text {{ tenths }} \div 1 \text {{ tenth }} \\ &=840 \end{{aligned}}$
		
		Fraction multiplication strategy
		Decimals are a kind of fraction, so we can use fraction multiplication.
		$\begin{{aligned}} & 84 \div 0.1 \\ =& \frac{{84}}{{0.1}} \\ =& \frac{{84 \times 10}}{{0.1 \times 10}} \\ =& \frac{{840}}{{1}} \\ =& 840 \end{{aligned}}$
		
		The answer
		$840=84 \div 0.1$
		{hint_s.strip()}
        """
        
        answer_s = rf"""
        $84 \div 0.1=840$
		
		"""

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

    def get_question_decimal_addition(self):
        keywords = [
            'grade5',
            'grade 5',
            'decimal_addition',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Estimate.
        $4.7+1.67 \approx$
        Choose 1 answer:
        (A) 1
        (B) 3
        (C) 5
        (D) 7
        """
        
        soln_s = rf"""
        We estimate to add, subtract, multiply, and divide with friendly numbers.
        $4.7$ is about 5 .
        $4.7 \approx 5$
        $1.67$ is about $2 .$
        $1.67 \approx 2$
        $5+2=7$
        $4.7+1.67 \approx 7$

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $4.7+1.67 \approx 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_fraction_to_decimal(self):
        keywords = [
            'grade5',
            'grade 5',
            'fraction_to_decimal',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Without using a calculator, convert the fraction to a decimal.
		$\displaystyle \frac{{3}}{{4}}=$
		"""
        
        soln_s = rf"""
        Let's draw $\frac{{3}}{{4}}$ on a fraction model.
		<img src="https://cdn.kastatic.org/ka-perseus-graphie/cec01f73fa490f70f62d485a45ee402b5c510213.svg">
        Decimals are a special way of writing fractions like tenths and hundredths.
		How can we shade the same area using hundredths?
		<img src="https://cdn.kastatic.org/ka-perseus-graphie/9b99f15e0c1b46867fe59e098b0c7f924a20d301.svg">
        $\frac{{3}}{{4}}$ is the same as 75 hundredths.
		$\frac{{3}}{{4}}=0.75$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\frac{{3}}{{4}}=0.75$
		"""

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

    def get_question_point_number_line(self):
        keywords = [
            'grade5',
            'grade 5',
            'point_number_line',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        TODO point_number_line
        Which point on the number line represents $0.010$ ?
        Choose 1 answer:
        (A) Point $A$
        (B) Point $B$
        (C) Point $C$
        """
        
        soln_s = rf"""
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\frac{{3}}{{4}}=0.75$
		"""

        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_1(self):
        keywords = [
            'grade5',
            'grade 5',
            'fraction_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Which equation shows the same relationship as $72 \times \frac{{1}}{{8}}=9$ ?
		Choose 1 answer:
		(A) $\displaystyle 72=9 \div \frac{{1}}{{8}}$
		(B) $\displaystyle 72 \times 9=\frac{{1}}{{8}}$
		(c) $\displaystyle 72=\frac{{1}}{{8}} \div 9$
		
        """
        
        soln_s = rf"""
        Multiplication and division are related:
		number of groups $\times$ size of groups $=$ total
		size of groups $\times$ number of groups $=$ total
		total $\div$ number of groups $=$ size of groups
		total $\div$ size of groups $=$ number of groups
		In this fact family, the total is $9 .$
		The size of each group is 72 .
		The number of the groups is $\frac{{1}}{{8}}$.
		We can multiply the size of the groups, 72 , and number of the groups, $\frac{{1}}{{8}}$, to get the total, $9 .$
		We can also divide the total, 9 , by size of the groups, 72 , or the number of the groups, $\frac{{1}}{{8}}$
		This number sentence show the same relationship:
		$\displaystyle 72=9 \div \frac{{1}}{{8}}$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\displaystyle 72=9 \div \frac{{1}}{{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_expression(self):
        keywords = [
            'grade5',
            'grade 5',
            'expression',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Which expression represents 43 minus the sum of 16 and 11 ?
        Choose 1 answer:
        (A) $43-(16+11)$
        (B) $(43-16)+11$
        (c) $(16+11)-43$
        """
        
        soln_s = rf"""
        We can write the sum of 16 and 11 as $16+11$.
        Now we can show 43 minus the sum.
        So, we must put the expression $16+11$ in parentheses.
        $(16+11)$
        Then, we put the 43 minus in front of the parentheses:
        $43-(16+11)$
        The expression $43-(16+11)$ represents 43 minus the sum of 16 and 11 .
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The expression $43-(16+11)$ represents 43 minus the sum of 16 and 11 .
        """

        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 = [
            'grade5',
            'grade 5',
            'fraction_word_problem',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Jackie loves to cook fried foods. She recorded the total amount of oil that she used each month in the table below.
		In January, she used $\displaystyle \frac{{3}}{{5}}$ of the amount of oil that she used in February.
		Fill in the amount of oil that Jackie used in January in the table below.
		$\begin{{array}}{{lc}} 
		\text{{Month}} & \text{{Liters of oil used}} \\
		\hline \text{{Januar}}y & \\
		\text{{February}} & \frac{{2}}{{3}} \\
		\text{{March}} & 1 \frac{{1}}{{2}}
		\end{{array}}$
		"""
        
        soln_s = rf"""
        Jackie used $\displaystyle \frac{{3}}{{5}}$ of February's amount in January. She used $\displaystyle \frac{{2}}{{3}}$ of a liter in February.
		$\displaystyle \frac{{3}}{{5}}$ of $\displaystyle \frac{{2}}{{3}}$ is another way of saying $\displaystyle \frac{{3}}{{5}} \times \frac{{2}}{{3}}$.
		
		$\displaystyle \begin{{aligned}} \frac{{3}}{{5}} \text {{ of }} \frac{{2}}{{3}} &=\frac{{3}}{{5}} \times \frac{{2}}{{3}} \\ &=\frac{{3 \times 2}}{{5 \times 3}} \\ &=\frac{{3 \times 2}}{{5 \times 8}} \\ &=\frac{{1 \times 2}}{{5 \times 1}} \\ &=\frac{{2}}{{5}} \end{{aligned}}$
		
		Jackie used $\frac{{2}}{{5}}$ of a liter of oil in January.
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Jackie used $\frac{{2}}{{5}}$ of a liter of oil in January.
		"""

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

    def get_question_decimal_1(self):
        keywords = [
            'grade5',
            'grade 5',
            'decimal_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        In which number does the digit 2 have a value that is $\frac{{1}}{{10}}$ times as great as the digit 2 in the number $6,257.11$ ?
        Choose 1 answer:
        (A) $7,326.64$
        (B) $5,619.25$
        (C) $291.93$
        (D) $2.575$
        
        
        """
        
        soln_s = rf"""
        What is the value of the 2 in $6,257.11 ?$
		The value of the 2 in $6,257.11$ is 2 hundreds or 200 .
		
		What is $\frac{{1}}{{10}}$ times as great as 2 hundreds?
		A digit in a place value column to the right is $\frac{{1}}{{10}}$ times as much as the same digit to the left.
		$\frac{{1}}{{10}} \times 200=20$
		Which number has a 2 with a value of 20 ?
		
		The value of the 2 in the number $7,326.64$ is 2 tens or 20 .
		The value of the 2 in the number $7,326.64$ is $\frac{{1}}{{10}}$ times the value of the 2 in the number $6,257.11$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The value of the 2 in the number $7,326.64$ is $\frac{{1}}{{10}}$ times the value of the 2 in the number $6,257.11$
		"""

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

    def get_question_decimal_word_problem(self):
        keywords = [
            'grade5',
            'grade 5',
            'decimal_word_problem',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        The library is $14.2 \mathrm{{~km}}$ away from Daniel's apartment. The bus takes Daniel $11.15 \mathrm{{~km}}$ of the way to the library. He has to walk the remaining distance.
		How many meters does Daniel have to walk?
		
        
        """
        
        soln_s = rf"""
        We subtract the distance the bus takes Daniel from the total distance to the library to find out how far Daniel has to walk.
		$14.20 -11.15 = 3.05$
		Daniel walks $3.05 \mathrm{{~km}}$
		We need to convert $3.05 \mathrm{{~km}}$ to meters.
		$1 \mathrm{{~km}}=1,000 \mathrm{{~m}}$
		So, $3.05 \mathrm{{~km}}=3.05 \times 1,000=3,050 \mathrm{{~m}}$.
		Daniel walks 3,050 meters.
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Daniel walks 3,050 meters.
		"""

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

    def get_question_parentheses(self):
        keywords = [
            'grade5',
            'grade 5',
            'parentheses',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Where can we put parentheses in $19-3 \times 5$ to make it equivalent to 80 ?
        Choose 1 answer:
        (A) $19-(3 \times 5)$
        (B) $(19-3) \times 5$
                
        """
        
        soln_s = rf"""
        Parentheses are used to indicate which operations are meant to be solved first.
		Let's put the parentheses around $3 \times 5$ and see what our answer is.
		$\begin{{aligned}} & 19-(3 \times 5) \\ =& 19-15 \\ =& 4 \end{{aligned}}$
		$19-(3 \times 5)$ is not equivalent to 80 .
		Now, let's put the parentheses around $19-3$ and see what our answer is.
		$(19-3) \times 5$
		$=16 \times 5$
		$=80$
		$(19-3) \times 5$ is equivalent to 80 .
		The following expression is equivalent to 80 :
		$(19-3) \times 5$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $(19-3) \times 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_inequality(self):
        keywords = [
            'grade5',
            'grade 5',
            'inequality',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Compare using $>,<$, or $=$
        11 yards $?$ 51 feet        
        """
        
        soln_s = rf"""
        To compare, we need the numbers to have the same units.
        Let's convert 11 yards to feet.
        1 yard $=3$ feet
        So, 11 yards $=11 \times 3=33$ feet.
        Now, we can compare.
        33 feet $<51$ feet
        11 yards $<51$ feet
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        11 yards $<51$ feet
        """

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

    def get_question_expression_to_decimal(self):
        keywords = [
            'grade5',
            'grade 5',
            'expression_to_decimal',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Represent the expression
		$\displaystyle (4 \times 1,000)+(3 \times 100)+\left(6 \times \frac{{1}}{{100}}\right)+\left(7 \times \frac{{1}}{{1000}}\right)$
		as a decimal number.
		"""
        
        soln_s = rf"""
        Let's write the products in parentheses as decimals first, then add.
		Let's solve:
		$\begin{{aligned}} &(4 \times 1,000)+(3 \times 100)+\left(6 \times \frac{{1}}{{100}}\right)+\left(7 \times \frac{{1}}{{1000}}\right) \\ &=4,000+300+0.06+0.007 \\ &=4,300.067 \end{{aligned}}$
		{hint_s.strip()}
        """
        
        answer_s = rf"""
        4,300.067
        """

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

    def get_question_volume(self):
        keywords = [
            'grade5',
            'grade 5',
            'volume',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Unit cube:
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/80a55fe49152df92865fd39a03af52ce356f9c1d.svg">
		What is the volume of the following figure? 
        Front View
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/df11bc7306fdea41d9452f74c2a4fd341fd9d75b.svg">
		Back View
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/56b7cf9f65281154ff8af0e859b8b3ec1d8fcc6b.svg">
		
        """
        
        soln_s = rf"""
        We can separate the figure into 2 rectangular prisms and find the volume of each.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/3cd365467862b43f0c03d00ddc27121c0311ce93.svg">

        Volume of a rectangular prism is equal to length times width times height $(V=l \times w \times h)$.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/302d1ceb9a4e08589b475278d865a4d627863e68.svg">

        Volume of prism $1=4 \times 5 \times 1=20$ cubic units
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/c91bf3bca30e578b7046296720ff555d8d025f06.svg">

        Volume of prism $2=3 \times 2 \times 2=12$ cubic units
        Now, we need to add to find the volume of the entire figure.
        Volume of entire figure $=20+12=32$ cubic units
        The volume of the figure is 32 cubic units.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        32 cubic units
        """

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

    def get_question_volume(self):
        keywords = [
            'grade5',
            'grade 5',
            'volume',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Unit cube:
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/80a55fe49152df92865fd39a03af52ce356f9c1d.svg">
		What is the volume of the following figure? 
        Front View
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/df11bc7306fdea41d9452f74c2a4fd341fd9d75b.svg">
		Back View
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/56b7cf9f65281154ff8af0e859b8b3ec1d8fcc6b.svg">
		
        """
        
        soln_s = rf"""
        We can separate the figure into 2 rectangular prisms and find the volume of each.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/3cd365467862b43f0c03d00ddc27121c0311ce93.svg">

        Volume of a rectangular prism is equal to length times width times height $(V=l \times w \times h)$.
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/302d1ceb9a4e08589b475278d865a4d627863e68.svg">

        Volume of prism $1=4 \times 5 \times 1=20$ cubic units
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/c91bf3bca30e578b7046296720ff555d8d025f06.svg">

        Volume of prism $2=3 \times 2 \times 2=12$ cubic units
        Now, we need to add to find the volume of the entire figure.
        Volume of entire figure $=20+12=32$ cubic units
        The volume of the figure is 32 cubic units.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        4,300.067
        """

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

    def get_question_decimal_subtraction_1(self):
        keywords = [
            'grade5',
            'grade 5',
            'decimal_subtraction_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Harry's spell casting class lasts for $2 \frac{{5}}{{6}}$ hours each day. Today, he has been in the class for $1 \frac{{2}}{{5}}$ of an hour so far.
		How much more time is left in the class?
		
        """
        
        soln_s = rf"""
        $\displaystyle 2 \frac{{5}}{{6}}-1 \frac{{2}}{{5}}$
		Our denominators need to be the same so we can subtract
		What is the least common multiple for the denominators 6 and 5 ?
		The least common multiple of 6 and 5 is 30 .
		$\displaystyle \begin{{aligned}} &\frac{{5 \times 5}}{{6 \times 5}}=\frac{{25}}{{30}} \\ &\frac{{2 \times 6}}{{5 \times 6}}=\frac{{12}}{{30}} \end{{aligned}}$
		
		Now, let's subtract our fractions.
		$\displaystyle \frac{{25}}{{30}} -\frac{{12}}{{30}} = \frac{{13}}{{30}}$
		
		Last, let's subtract our whole numbers.
		$2 - 1 = 1$
		There is $1 \frac{{13}}{{30}}$ hours left in class.
		This can also be written as $\frac{{43}}{{30}}$.
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $1 \frac{{13}}{{30}}$ hours left in class.
        """

        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_1(self):
        keywords = [
            'grade5',
            'grade 5',
            'fraction_word_problem_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        At a science museum, Julia compares the length of a T-rex tooth and a crocodile tooth. The T-rex tooth is $\frac{{7}}{{12}}$ foot long. The crocodile tooth is $\frac{{1}}{{4}}$ foot long.
		What expression can be used to find how much longer the T-rex tooth is than the crocodile tooth?
		Choose 1 answer:
		(A) $\displaystyle \frac{{7}}{{12}}-\frac{{1}}{{12}}$
		(B) $\displaystyle \frac{{7}}{{16}}-\frac{{1}}{{16}}$
		(c) $\displaystyle \frac{{7}}{{12}}-\frac{{3}}{{12}}$
		(D) $\displaystyle \frac{{7}}{{16}}-\frac{{3}}{{16}}$
		
        """
        
        soln_s = rf"""
        To add or subtract fractions, they need to have the same denominator.
		So, we are looking for an equivalent expression that has common denominators.
		To find how much longer the T-rex tooth was than the crocodile tooth, we need to subtract $\displaystyle \frac{{1}}{{4}}$ from $\displaystyle \frac{{7}}{{12}}$
		Let's change $\displaystyle \frac{{1}}{{4}}$ to an equivalent fraction with a denominator of 12 .
		$\displaystyle \begin{{aligned}} &\frac{{1}}{{4}}=\frac{{1}}{{4}} \times \frac{{3}}{{3}}=\frac{{1 \times 3}}{{4 \times 3}}=\frac{{3}}{{12}} \\ &\frac{{1}}{{4}}=\frac{{3}}{{12}} \end{{aligned}}$
		So, we can replace $\displaystyle \frac{{1}}{{4}}$ with $\displaystyle \frac{{3}}{{12}}$ in our expression.
		The following expression can be used to find how much longer the T-rex tooth is than the crocodile tooth.
		$\displaystyle \frac{{7}}{{12}}-\frac{{3}}{{12}}$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\displaystyle \frac{{7}}{{12}}-\frac{{3}}{{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_expand_decimal(self):
        keywords = [
            'grade5',
            'grade 5',
            'expand_decimal',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        Which two of the following have the same value as 18 ones and 302 thousandths?
		Choose 2 answers:
		(A) $(1 \times 10)+(8 \times 1)+\left(3 \times \frac{{1}}{{100}}\right)+\left(2 \times \frac{{1}}{{1,000}}\right)$
		(B) $(1 \times 10)+(8 \times 1)+\left(3 \times \frac{{1}}{{10}}\right)+\left(2 \times \frac{{1}}{{1,000}}\right)$
		(C) 18,302
		(D) 1 ten $+8$ ones $+3$ tenths $+2$ thousandths
		
        """
        
        soln_s = rf"""
        FIX solution

        The following expressions have the same value as 18 ones and 302 thousandths
		1 ten $+8$ ones $+3$ tenths $+2$ thousandths
		$1 \times 10+(8 \times 1)+\left(3 \times \frac{{1}}{{10}}\right)+\left(2 \times \frac{{1}}{{1,000}}\right)$
		
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The following expressions have the same value as 18 ones and 302 thousandths
		1 ten $+8$ ones $+3$ tenths $+2$ thousandths
		$1 \times 10+(8 \times 1)+\left(3 \times \frac{{1}}{{10}}\right)+\left(2 \times \frac{{1}}{{1,000}}\right)$
		
		"""

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

    def get_question_exponent(self):
        keywords = [
            'grade5',
            'grade 5',
            'exponent',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        
        """
        
        prob_s = rf"""
        What exponent will make this equation true?
        $10^{{?}}=1,000,000$
        """
        
        soln_s = rf"""
        We can see that for powers of 10 , the number of zeros is the same as the exponent of 10 .
        How many zeros are in 1,000,000?
        $1,000,000$ has 6 zeros.
        The answer
        $10^{{6}}=1,000,000$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $10^{{6}}=1,000,000$

		"""

        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 = [
            'grade5',
            'grade 5',
            ]
        
        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 Grade5StoredQuestions:
