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

# _grade7_stored_questions
# Grade7StoredQuestions

class Grade7StoredQuestions(BaseStoredQuestions):
    _QUESTION_KEYWORDS = None
    
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        pass
    
    
    def get_question_division_sign(self):
        keywords = [
            'grade7',
            'grade 7',
            'division_sign',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        from xv.math.basicmaths import ArithmeticOperationManager
        
        
        """
        
        prob_s = rf"""
        Which of the following expressions are equivalent to $\displaystyle -\frac{{2}}{{-13}}$ ?
        Choose all answers that apply:
        (A) $\displaystyle \frac{{-2}}{{-13}}$
        (B) $\displaystyle -\frac{{-2}}{{13}}$
        (C) None of the above
		
        """
        
        soln_s = rf"""
        Let's simplify the expression given in the question.
		$\displaystyle -\frac{{2}}{{-13}}=\frac{{2}}{{13}}$
		Now, let's simplify the answer choices to see if they are equivalent to this expression.
		$\displaystyle \frac{{-2}}{{-13}}=\frac{{2}}{{13}}$
		$\displaystyle -\frac{{-2}}{{13}}=\frac{{2}}{{13}}$
		The following expressions are equivalent to $-\frac{{2}}{{-13}}$ :
		$\displaystyle \frac{{-2}}{{-13}}$
		$\displaystyle -\frac{{-2}}{{13}}$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\displaystyle \frac{{-2}}{{-13}}$
        $\displaystyle -\frac{{-2}}{{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_algebric_equation(self):
        keywords = [
            'grade7',
            'grade 7',
            'algebric_equation',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        from xv.math.algebra import SingleVariableManager
        
        
        """
        
        prob_s = rf"""
        Roger gets $\$ 40$ per day as wages and $\$ 4.50$ as commission for every pair of shoes he sells in a day. His daily earnings goal is $\$ 112$.

        Write an equation to determine how many pairs of shoes, $p$, Roger must sell in a day to meet his daily earnings goal.
        Find the number of pairs of shoes he must sell to meet his daily earnings goal.		
        """
        
        soln_s = rf"""
        Let $p$ be the number of shoes Roger has to sell to meet his daily earnings goal.
		Roger is paid $\$ 40$ in wages per day. His commission for selling $p$ pairs of shoes is $\$ 4.50 p$.
		His total earnings for the day is $40+4.5 p$.
		Since his earnings goal $\$ 112$, let's set this equal to 112 :
		$40+4.50 p=112$
		Now, let's solve the equation to find the number of pairs of shoes $(p)$ Roger has to sell to meet his daily earnings goal.
		$40+4.5 p=112$
		$40+4.5 p-40=112-40$ subtract 40 from each side
		$4.5 p=72$
		
		$\displaystyle \frac{{4.5 p}}{{4.5}}=\frac{{72}}{{4.5}} \quad$ divide each side by $4.5$
		$p=16$
		The equation is $40+4.5 p=112$.
		Roger must sell 16 pairs of shoes to meet his daily earnings goal.
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Roger must sell 16 pairs of shoes to meet his daily earnings goal.
        """

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

    def get_question_angles(self):
        keywords = [
            'grade7',
            'grade 7',
            'angles',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        Solve for x in the diagram below.

        TODO angles
        """
        
        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_figure_scaling(self):
        keywords = [
            'grade7',
            'grade 7',
            'figure_scaling',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        Is Figure B a scale copy of Figure A?

        TODO figure_scaling
        """
        
        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_algebric_equation_1(self):
        keywords = [
            'grade7',
            'grade 7',
            'algebric_equation_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        from xv.math.algebra import SingleVariableManager

        """
        
        prob_s = rf"""
        Wangari plants trees at a constant rate of 12 trees every 3 hours.
        Write an equation that relates p, the number of trees Wangari plants, and h, the time she spends planting them in hours.
        """
        
        soln_s = rf"""
        Let's find the constant of proportionality.
		In the proportional relationship between $p$, the number of trees Wangari plants, and $h$, the time she spends planting them in hours, one constant of proportionality is the number of trees she plants per hour. It is the number we multiply by the number of hours to get the number of trees she plants.
		$\displaystyle h \times ?=p$
		$\displaystyle ?=\frac{{p}}{{h}}$
		$\displaystyle =\frac{{12}}{{3}}$
		$=4$
		The constant of proportionality is 4 . This means we can multiply 4 by the number of hours to get the number of trees.
		Now, let's write the equation:
		number of trees $=$ planting rate $\times$ number of hours
		$p=4 h$
		One correct equation is:
		$p=4 h$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $p=4 h$
        """

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

    def get_question_draw_shapes_map(self):
        keywords = [
            'grade7',
            'grade 7',
            'draw_shapes_map',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        from xv.math.geometry import BasicPlottingManager

        """
        
        prob_s = rf"""
        TODO draw_shapes_map



        Peter just buried a treasure chest on a remote island and is making a map so he can find it later. One of the key landmarks in the area is a small rectangular hut, 5m by 8m.
        Move the points to draw the hut on Peter's treasure map below.
        
        """
        
        soln_s = rf"""
        Notice that every 2 units (grid spaces) represent $1 \mathrm{{~m}}$.
		We can perform a unit conversion to figure out how many units we need to represent $5 \mathrm{{~m}}$ :
		$\displaystyle \begin{{aligned}} & 5 \mathrm{{m}} \cdot \frac{{2 \text {{ units }}}}{{1 \mathrm{{m}}}} \\ =& 5 \cdot \frac{{2 \text {{ units }}}}{{1}} \\ =& 10 \text {{ units }}\end{{aligned}}$
		We can do another unit conversion to find how many units we need to represent $8 \mathrm{{~m}}$ :
		$\displaystyle\begin{{aligned}}& 8 \mathrm{{m}} \cdot \frac{{2 \text {{ units }}}}{{1 \mathrm{{~m}}}} \\ =& 8 \cdot \frac{{2 \text {{ units }}}}{{1}} \\ =& 16 \text {{ units }}\end{{aligned}}$
		Drag the points to draw a rectangle measuring 10 units by 16 units.
		
        {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_add_percentage(self):
        keywords = [
            'grade7',
            'grade 7',
            'add_percentage',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        from xv.math.basicmaths import ArithmeticOperationManager
        """
        
        prob_s = rf"""
        $-185 \%-1.7=$
        """
        
        soln_s = rf"""
        $-185 \%-1.7= -3.55$
        {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_algebric_equation_2(self):
        keywords = [
            'grade7',
            'grade 7',
            'algebric_equation_2',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        from xv.math.algebra import AlgebricExpressionManager
        
        """
        
        prob_s = rf"""
		Evaluate $-y+(-z)+7.99$ where $y=1.46$ and $z=3.82$.
        """
        
        soln_s = rf"""
        Let's substitute $y=1.46$ and $z=3.82$ into the expression.
		$\displaystyle \begin{{aligned}} &-y+(-z)+7.99 \\ =&-1.46+(-3.82)+7.99 \\ =&-1.46-3.82+7.99 \\ =&-5.28+7.99 \\ =& 2.71 \end{{aligned}}$
		
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        2.71
        """

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

    def get_question_statistics(self):
        keywords = [
            'grade7',
            'grade 7',
            'statistics',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        
        """
        
        prob_s = rf"""
        TODO statistics


		Answer two questions about the following table.
		At Buffalo Mild Wings, the price of chicken wings depends on the number of wings that you order.
		\begin{{tabular}}{{lccc}}
		\hline Chicken wings & 8 & 16 & 24 \\
		Price & $\$ 5$ & $\$ 8$ & $\$ 10$
		\end{{tabular}}
		Plot the ordered pairs from the table.
		
        At Buffalo Mild Wings, is the price of chicken wings proportional to the number of wings you order?
        """
        
        soln_s = rf"""
        No, the relationship is not proportional.

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        No, the relationship is not proportional.

        """

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

    def get_question_arithmetic(self):
        keywords = [
            'grade7',
            'grade 7',
            'arithmetic',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        from xv.math.basicmaths import ArithmeticOperationManager

        """
        
        prob_s = rf"""
        Divide.
		Write your answer in simplest form.
		$\displaystyle -\frac{{5}}{{2}} \div \frac{{5}}{{7}}=?$
		
		
        """
        
        soln_s = rf"""
        Dividing by a fraction is the same as multiplying by the reciprocal of the fraction.
		The reciprocal of $\displaystyle \frac{{5}}{{7}}$ is $\displaystyle \frac{{7}}{{5}}$.
		Therefore:
		$\displaystyle \begin{{aligned}} -\frac{{5}}{{2}} \div \frac{{5}}{{7}} &=-\frac{{5}}{{2}} \times \frac{{7}}{{5}} \\ &=\frac{{-5 \times 7}}{{2 \times 5}} \\ &=-\frac{{35}}{{10}} \end{{aligned}}$
		Simplify:
		$\displaystyle -\frac{{7}}{{2}}$
		
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\displaystyle -\frac{{7}}{{2}}$
		
        """

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

    def get_question_rate_of_change(self):
        keywords = [
            'grade7',
            'grade 7',
            'arithmetic',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        A certain reality TV show lost a total of 9,000 viewers over the past 3 months. It lost the same number of viewers each month.
		The following equation describes this situation.
		$\displaystyle -9,000 \div 3=-3,000$
		What does $-3,000$ tell us?
		Choose 1 answer:
		(A) There are 3,000 fewer people watching the show compared to three months ago.
		(B) The total change in the number of people watching the show is $-3,000$.
		(C) None of the above
		
		
        """
        
        soln_s = rf"""
        Total change in viewers $=-9,000$
		
		There are not 3,000 fewer people watching the show compared to three months ago. $(9,000$ fewer people are watching the show compared to three months ago.)
		The first answer choice is not correct.
		The total change in the number of people watching the show is not $-3,000$. (It is $-9,000$.)
		The second answer choice is not correct.
		The correct answer choice is "None of the above."
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
		The correct answer choice is "None of the above."
		
        """

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

    def get_question_proportionality(self):
        keywords = [
            'grade7',
            'grade 7',
            'proportionality',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        TODO proportionality



        Which table has a constant of proportionality between $y$ and $x$ of $0.9$ ?

        """
        
        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_simplification(self):
        keywords = [
            'grade7',
            'grade 7',
            'simplification',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>
        from xv.math.algebra import AlgebricExpressionManager

        """
        
        prob_s = rf"""
        Simplify to create an equivalent expression.
        $4(-15-3 p)-4(-p+5)$
        Choose 1 answer:
        (A) $-8 p-80$
        (B) $-13 p-80$
        (C) $-8 p+80$
        (D) $8 p-80$
        """
        
        soln_s = rf"""
        Distribute the 4 to each term inside the first set of parentheses:
        $\displaystyle 4(-15-3 p)-4(-p+5)=-60-12 p-4(-p+5)$
        Distribute the $-4$ to each term inside the second set of parentheses:
        $\displaystyle -60-12 p-4(-p+5)=-60-12 p+4 p-20$
        Rewrite the expression to group the $p$-terms and numeric terms and then combine like terms:
        $\displaystyle -12 p+4 p-60-20=-8 p-80$
        The simplified expression is $-8 p-80$.

        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
		The simplified expression is $-8 p-80$.
        """

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

    def get_question_triangles(self):
        keywords = [
            'grade7',
            'grade 7',
            'triangles',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        Could $10.6 \mathrm{{~cm}}, 5.6 \mathrm{{~cm}}$, and $4.0 \mathrm{{~cm}}$ be the side lengths of a triangle?
		Choose 1 answer:
		(A) Yes
		(B) No

        """
        
        soln_s = rf"""
        Triangle inequality theorem states that a side must be smaller than the sum of the other two sides.
        Let's check for all three sides:
        $10.6+5.6=16.2$
        $4.0$ is smaller than $16.2$ so the theorem holds.
        $4.0+5.6=9.6$
        $10.6$ is not smaller than $9.6$ so the theorem does not hold.
        $4.0+10.6=14.6$
        $5.6$ is smaller than $14.6$ so the theorem holds.
        Not all three sides conform to the inequality theorem, so this triangle cannot exist.

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

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

    def get_question_circumference(self):
        keywords = [
            'grade7',
            'grade 7',
            'circumference',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        What is the circumference of the following circle?
        Use $3.14$ for $\pi$ and enter your answer as a decimal.    

        """
        
        soln_s = rf"""
        $c=2 \pi r$
        $\approx 2(3.14) \cdot 7$
        $\approx 43.96$ units
        
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $43.96$ 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_division_sign_1(self):
        keywords = [
            'grade7',
            'grade 7',
            'division_sign_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        What is the sign of $\displaystyle \frac{{-x}}{{-y}}$ when $x>0$ and $y>0 ?$
		Choose 1 answer:
		(A) Positive
		(B) Negative
		(C) Zero

        """
        
        soln_s = rf"""
        An expression with an even number of negative signs is positive, and an expression with an odd number of negative signs is negative.
        How many negative signs are in the given expression?
        There are a total of 2 negative signs.
        The given expression is positive.
                
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Positive

        """

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

    def get_question_scaling_figure(self):
        keywords = [
            'grade7',
            'grade 7',
            'scaling_figure',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        TODO scaling_figure.



        Ismael made a scaled copy of the following quadrilateral. He used a scale factor less than $1 .$
		What could be the length of the side that corresponds with $\overline{{A D}}$ on the scaled copy of the quadrilateral?
		Choose 3 answers:		
		(A) 4 units
		(B) 6.5 units
		(C) 12 units
		(D) 32 units
		(E) 64 units
        """
        
        soln_s = rf"""
        Since the scale factor is less than 1 , Ismael multiplied the side length by a number less than 1 .
        If we multiply 16 by a number less than 1 , the product will be less than 16 .
        The side lengths in the scaled copy must be less than $16 .$
        In other words, a scale factor less than 1 scales down the figure.
        The following are possible side lengths of the scaled copy of the quadrilateral:
        - 4 units
        - 6.5 units
        - 12 units   

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        - 4 units
        - 6.5 units
        - 12 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_proportionality_1(self):
        keywords = [
            'grade7',
            'grade 7',
            'proportionality_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        TODO proportionality_1

        The quantities $x$ and $y$ are proportional.
        Find the constant of proportionality $(r)$ in the equation $y=r x$.
        """
        
        soln_s = rf"""
        What times $x$ gives us $y$ ?
        If we multiply each $x$-value by 10 , we get to each corresponding $y$-value:
        $y=10 x$
        The constant of proportionality $(r)$ in the equation $y=r x$ is 10 .

        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $r = 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_fraction_decimal(self):
        keywords = [
            'grade7',
            'grade 7',
            'fraction_decimal',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        Rewrite the fraction as a decimal.
		$\displaystyle \frac{{57}}{{5}}=$
		"""
        
        soln_s = rf"""
        $\displaystyle \frac{57}{5}=11.4$
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $\displaystyle \frac{57}{5}=11.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_angle_relation(self):
        keywords = [
            'grade7',
            'grade 7',
            'angle_relation',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        What is the relationship between these angles ?
        <img src="https://cdn.kastatic.org/ka-perseus-graphie/8341d8a0bcd2b788b8a17f1ffd1f42404c49a8a4.svg">
        
        Choose 1 answer:
        Vertical angles
        Complementary angles
        Supplementary angles
        None of the above
		"""
        
        soln_s = rf"""
        Definitions
		Vertical angles are angles opposite each other where two lines cross.
		Complementary angles are when two angles add up to $90^{{\circ}}$. A common case is when they form a right angle.
		
		Supplementary angles are when two angles add up to $180^{{\circ}}$. A common case is when they lie on the same side of a straight line.
		
        
        The answer
        Vertical angles
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        Vertical angles
        

        """

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

    def get_question_numberline(self):
        keywords = [
            'grade7',
            'grade 7',
            'numberline',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        TODO numberline



        The blue dot is at what value on the number line?

		"""
        
        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_speed_time_equation(self):
        keywords = [
            'grade7',
            'grade 7',
            'speed_time_equation',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        TODO speed_time_equation



        A robot moves at a constant speed. The distance it moves and the time it spends moving are shown in this table:
        Write an equation to describe the relationship between $t$, the time, and $d$, the distance.
		
        """
        
        soln_s = rf"""
        Let's find the constant of proportionality.
		In the proportional relationship between $t$, the time, and $d$, the distance, one constant of proportionality is the speed of the robot. It is the number we multiply by the time to get the distance.
		$t \times ?=d$
		
		The constant of proportionality is $0.7$. This means we can multiply $0.7$ by the time to get the distance.
		Now, let's represent that as an equation.
		distance $=$ speed $\times$ time
		$d=0.7 t$
		One correct equation is:
		$d=0.7 t$
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        $d=0.7 t$


        """

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

    def get_question_percentage_operation(self):
        keywords = [
            'grade7',
            'grade 7',
            'percentage_operation',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        Ming took a cab across town. His fare was $\$ 22$, and he leaves an $18 \%$ tip.
        What is the total amount Ming pays the cab driver?
        """
        
        soln_s = rf"""
        First, we find the amount Ming tips. What is $18 \%$ of $\$ 22$ ?
		$18 \% \times 22=?$
		Percent means per hundred, so $18 \%$ is equivalent to $\displaystyle \frac{{18}}{{100}}$, which is also equal to $18 \div 100$.
		$18 \div 100=0.18$
		$0.18 \times 22=3.96$
		Ming tips $\$ 3.96$.
		To find the total amount Ming pays the cab driver, add the fare, $\$ 22$, and the tip, $\$ 3.96$.
		$22+3.96=25.96$
		Ming pays the cab driver a total of $\$ 25.96$.
		
		
        {hint_s.strip()}
        """
        
        answer_s = rf"""
		Ming pays the cab driver a total of $\$ 25.96$.


        """

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

    def get_question_algebric_expr(self):
        keywords = [
            'grade7',
            'grade 7',
            'algebric_expr',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        Combine like terms to create an equivalent expression.
        $3.4-2.8 d+2.8 d-1.3$
        """
        
        soln_s = rf"""
        Combine the coefficients of the $d$ terms, and combine the constant terms.
        $3.4-2.8 d+2.8 d-1.3$
        $3.4-2.8 d+2.8 d-1.3$
        $=(-2.8+2.8) \cdot d+3.4-1.3$
        $=0 \cdot d+2.1$
        $=0+2.1$
        $=2.1$
        =The simplified expression is 2.1.
                
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        =The simplified expression is 2.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_numberline_1(self):
        keywords = [
            'grade7',
            'grade 7',
            'numberline_1',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        TODO numberline_1



        Which number line model represents the expression $\displaystyle -\frac{{2}}{{3}}+\left(-\frac{{1}}{{3}}\right) ?$
        """
        
        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_word_problem(self):
        keywords = [
            'grade7',
            'grade 7',
            'word_problem',
            ]
        
        
        hint_s = rf"""
        <b>See the following managers for more detailed explanation:</b>

        """
        
        prob_s = rf"""
        Kelby has several pets. She has $B$ birds, $C$ cats, and $F$ frogs.
        The expression $B+(C+F)$ represents the total number of pets Kelby has.
        What does $C+F$ represent in this context?
        Choose 1 answer:
        (A) The total number of cold-blooded pets
        (B) The total number of warm-blooded pets
        (C) The total number of pets with 2 legs
        (D) The total number of pets with 4 legs
        """
        
        soln_s = rf"""
        $C$ is the number of cats, and $F$ is the number of frogs Kelby has.
        Both cats and frogs have 4 legs each.
        The expression $C+F$ represents the number of pets with 4 legs.  
        {hint_s.strip()}
        """
        
        answer_s = rf"""
        The total number of pets with 4 legs
        """

        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 = [
            'grade7',
            'grade 7',
            ]
        
        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 Grade7StoredQuestions:
