Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- [[893,995,231,266,162],[245,343,991,339,726],[817,856,588,50,236],[490,861,107,926,940]] -->
- <html>
- <head>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css" crossorigin="anonymous">
- <script type="text/javascript" charset="UTF-8" src="https://cdnjs.cloudflare.com/ajax/libs/jsxgraph/0.99.3/jsxgraphcore.js"></script>
- </head>
- <body>
- <div id = "question-content">
- </div>
- <div id = "hint-content">
- </div>
- <div id = "solution-content">
- </div>
- <div id = "question-content2">
- </div>
- <div id = "hint-content2">
- </div>
- <div id = "solution-content2">
- </div>
- <div id = "question-content3">
- </div>
- <div id = "solution-content3">
- </div>
- <div id = "question-content4">
- </div>
- <div id = "hint-content4">
- </div>
- <div id = "solution-content4">
- </div>
- <div id = "question-content5">
- </div>
- <div id = "hint-content5">
- </div>
- <div id = "solution-content5">
- </div>
- <script src = "parser.bundle.js" charset = "UTF-8">
- </script>
- <script type = "text/javascript">
- const questionText = `A shop sells chocolate and vanilla cookies, in small and large boxes. The cost of a small box and a large box are $5 and $8 respectively. The table shows the number of boxes of each type of cookies sold on Monday.`
- const configString = `[matrices(M),matrices(N),matrices_elements(M,[[32,25],[16,10]]),matrices_elements(N,[[5],[8]]),matrices_addition(M,N,s),matrices(s),table(corner(),row_labels(Chocolate cookies,Vanilla cookies),col_labels(Small box,Large box),values([[32,25],[16,10]]))]`
- const questionString = ''
- const subparts = [
- {
- id: '100',
- questionString: 'find MN,',
- solutionString: `[matrix_solution(MN = [[32,25],[16,10]][[5],[8]]
- = [[32 * 5 + 25 * 8],[16 * 5 + 10 * 8]]
- = [[360],[160]])]`,
- }, {
- id: '101',
- questionString: 'explain what your answer represents.',
- solutionString: `[matrix_solution(The total sale of chocolate cookies is $360 and the total sale of vanilla cookies is $160.)]`,
- }
- ]
- const hintString = `Add corresponding elements in matrices`
- const solutionString = '[graph(scale(x-axis 2cm = 1 unit ,y-axis 1cm = 1 unit ),equation(x^2),values([[-3,7],[-2,1],[-1,-3],[0,-5],[1,-5],[2,-3],[3,1]])),numberline(xaxis(-5,5),inequality([[5>x>2],[2<x<=5],[x<5],[x>2],[x<=2]])),figure(xaxis(false),yaxis(false),xrange(-10,10),yrange(-10,10),shapes([line(coordinates(point(value(-6,0),label(string(X)),name(X)),point(name(Y),value(6,0),label(string(Y)))),type(solid),label(string(5cm)),head(arrow),tail(hollow_point),ticks([tick(type(line),label(A)),tick(type(line),label(B)),tick(type(arrow),label(C))])),line(coordinates(point(value(6,0),label(string(Y)),name(Y)),point(name(Z),value(0,6),label(string(Z)))),type(solid),label(string(2cm)),head(arrow),tail(hollow_point),ticks([tick(type(line),label(A)),tick(type(line),label(B)),tick(type(arrow),label(C))])),line(coordinates(point(value(0,6),label(string(X)),name(X)),point(name(Z),value(-6,0),label(string(Z)))),type(solid),label(string(3cm)),head(arrow),tail(hollow_point),ticks([tick(type(line),label(A)),tick(type(line),label(B)),tick(type(arrow),label(C))]))]),angle_group([angle(value(170),label(string(5)),between(Z,Y,X)),angle(value(250),label(string(170)),between(X,Z,Y))]))]'
- const questionHtml = parser.parseQuestion(questionText, configString, questionString, subparts)
- const hintHtml = parser.parseHint(hintString)
- const solutionHtml = parser.parseSolution(solutionString, subparts)
- document.getElementById('question-content').innerHTML = questionHtml
- document.getElementById('hint-content').innerHTML = hintHtml
- document.getElementById('solution-content').innerHTML = solutionHtml
- const questionText2 = `Two brands of toothpaste are sold at three shops. The table shows the price for each brand of toothpaste at each shop in 2006 and 2007.`
- const configString2 = `[matrices(P),matrices(Q),matrices_elements(P,[[1.50,1.70,1.60],[1.20,1.10,1.40]]),matrices_elements(Q,[[1.60,1.90,1.70],[1.20,1.30,1.40]]),matrices_addition(M,N,s),matrices(s),table(corner(2006),row_labels(Sparkle,Fresh),col_labels(Shop A,Shop B,Shop C),values([[1.50,1.70,1.60],[1.20,1.10,1.40]])),table(corner(2007),row_labels(Sparkle,Fresh),col_labels(Shop A,Shop B,Shop C),values([[1.60,1.90,1.70],[1.20,1.30,1.40]]))]`
- const questionString2 = ''
- const subparts2 = [
- {
- id: '100',
- questionString: 'Evaluate Q - P.',
- solutionString: `[matrix_solution(Q - P = [[1.60,1.90,1.70],[1.20,1.30,1.70]] - [[1.50,1.70,1.60],[1.20,1.10,1.40]]
- = [[0.10,0.20,0.10],[0,0.20,0.30]])]`,
- }, {
- id: '101',
- questionString: 'Explain what your answer represents.',
- solutionString: `[matrix_solution(The difference in prices of the tubes of toothpastes between the shops in 2006 and 2007.)]`,
- }, {
- id: '102',
- questionString: 'Write down the matrix M such that the product QM will give for each brand of toothpaste, the total cost of buying 20 tubes of toothpaste in 2007.',
- solutionString: `[matrix_solution(M = [[20],[20],[20]])]`,
- },
- ]
- const solutionString2 = ''
- const questionHtml2 = parser.parseQuestion(questionText2, configString2, questionString2, subparts2)
- const solutionHtml2 = parser.parseSolution(solutionString2, subparts2)
- document.getElementById('question-content2').innerHTML = questionHtml2
- document.getElementById('solution-content2').innerHTML = solutionHtml2
- const questionText3 = `A gift shop sells three different hampers for Valentine's day.
- Hamper A contains 3 bottles of wine and 5 boxes of chocolates.
- Hamper B contains 2 bottles of wine, 1 box of chocolates and 10 stalks of roses.
- Hamper C contains 1 bottle of wine and 24 stalks of roses.
- The prices of a bottle of wine is $18, a box of chocolates is $7 and a stalk of rose is $5.`
- const configString3 = ``
- const questionString3 = ''
- const subparts3 = [
- {
- id: '100',
- questionString: 'Write down two matrices such that the product will give the cost price of each type of hamper. Evaluate this product.',
- solutionString: `[matrix_solution([[3,5,0],[2,1,10],[1,0,24]][[18],[7],[5]] = [[3 * 18 + 5 * 7 + 0 * 5],[2 * 18 + 1 * 7 + 10 * 5],[1 * 18 + 0 * 7 + 24 * 5]]
- = [[89],[93],[138]])]`,
- }, {
- id: '101',
- questionString: 'The shop received an order of 62 Hamper A, 88 Hamper B and 126 Hamper C. Form two matrices such that the product will give the total cost of the hampers ordered. Evaluate this product.',
- solutionString: `[matrix_solution([[62,88,126]][[89],[93],[138]] = (62 * 89 + 88 * 93 + 126 * 138)
- = (31090))]`,
- }, {
- id: '102',
- questionString: 'The shop intends to make a profit of 15% on each Hamper A, 20% on each Hamper B and 30% on each Hamper C. Form two matrices such that the product will give the selling price of each hamper. Evaluate this product.',
- solutionString: `[matrix_solution([[1.15,0,0],[0,1.20,0],[0,0,1.30]][[89],[93],[138]] = [[102.35],[111.60],[179.40]])]`,
- },
- ]
- const solutionString3 = ''
- const questionHtml3 = parser.parseQuestion(questionText3, configString3, questionString3, subparts3)
- const solutionHtml3 = parser.parseSolution(solutionString3, subparts3)
- document.getElementById('question-content3').innerHTML = questionHtml3
- document.getElementById('solution-content3').innerHTML = solutionHtml3
- const questionString4 = `[string(Write down the next two terms in the following number sequence.),string(2, 5, 8, 11, ...)]`
- const questionHtml4 = parser.parseSolution(questionString4)
- document.getElementById('question-content4').innerHTML = questionHtml4
- const solutionString4 = '[sequence_difference_underneath(list([1,21,41,61]),new_terms([81,101]),differences([+3,+3,+3,+3,+3])),string(latex(\\therefore) The next two terms are 14 and 17.)]'
- const solutionHtml4 = parser.parseSolution(solutionString4)
- document.getElementById('solution-content4').innerHTML = solutionHtml4
- // const questionText5 = `The table below shows the speeds of 100 cars passing a speed camera on an expressway.`
- // const configString5 = `[table(corner(),row_labels(Speed (v km/h),Frequency),col_labels(),values([[latex(50 < v \\leq 60),latex(50 < v \\leq 60),latex(50 < v \\leq 60),latex(50 < v \\leq 60),latex(50 < v \\leq 60)],[8,4,36,47,5]]),highlighted(row_labels))]`
- // const questionString5 = `Calculate the estimated mean and the standard deviation of the speeds of the cars.`
- // const subparts5 = []
- // const questionHtml5 = parser.parseQuestion(questionText5, configString5, questionString5, subparts5)
- // document.getElementById('question-content5').innerHTML = questionHtml5
- // const solutionString5 = "[table(corner(),row_labels(),col_labels(Speed (v km/h),Frequency (f),Mid-value(x),latex(50 < v \\leq 60),latex(50 < v \\leq 60)),values([[latex(50 < v \\leq 60),8,55,440,24200],[latex(50 < v \\leq 60),4,65,260,16900],[latex(50 < v \\leq 60),36,75,2700,202500],[latex(50 < v \\leq 60),47,85,3995,339575],[latex(\\therefore 50 < v \\leq 60),5,95,475,45125],[,latex(50 < v \\leq 60),,latex(50 < v \\leq 60),latex(50 < v \\leq 60)]]),highlighted(column_labels)),evaluation_expression(lhs([string(Standard deviation),string(test string),latex(50 < v \\leq 60)]),rhs([latex(\\sqrt{\\frac{\sum fx^2}{\sum f} - (\\frac{\sum fx}{\sum f})^2} ),latex(\\sqrt{\\frac{628300}{100} - (\\frac{7870}{100})^2} ),latex(\\sqrt{\\frac{628300}{100} - 78.70^2} ),string(9.45 km/hr (upto 3 sig. fig))])),evaluation_expression(lhs([string(Mean speed)]),rhs([latex(\\frac{\sum fx}{\sum f}),latex(\\frac{7870}{100}),string(78.7 km/hr)]))]";
- // const solutionHtml5 = parser.parseSolution(solutionString5, subparts5)
- // document.getElementById('solution-content5').innerHTML = solutionHtml5
- // Concepts used : [subtraction_two_table,0]
- // Config_type : [subtraction_two_table]
- // Question_type : [two_table]
- // Qid : 1531709747
- // Options : [36.09104322382026,36.09104322382026,36.09104322382026,36.09104322382026]
- // Answer : 36.09104322382026
- // Answer_type : [numerical]
- // Question : q = [[[10,22],32],[[22,34],42],[[34,46],12],[[46,58],1],[[58,70],34],[[70,82],39],[[82,94],40],[[94,106],27],[[106,118],15],[[118,130],2],[[130,142],22]], Find Std_dev of q
- // Hint : Sorry, no hint for you!
- // Solution : Std_dev of [[[10,22],32],[[22,34],42],[[34,46],12],[[46,58],1],[[58,70],34],[[70,82],39],[[82,94],40],[[94,106],27],[[106,118],15],[[118,130],2],[[130,142],22]] = 36.09104322382026
- // [[[10,22],32],16]
- // [[[22,34],42],28]
- // [[[34,46],12],40]
- // [[[46,58],1],52]
- // [[[58,70],34],64]
- // [[[70,82],39],76]
- // [[[82,94],40],88]
- // [[[94,106],27],100]
- // [[[106,118],15],112]
- // [[[118,130],2],124]
- // [[[130,142],22],136]
- // Mean = {summation(fx)}/{summation(f)}
- // = 16*32 + 28*42 + 40*12 + 52*1 + 64*34 + 76*39 + 88*40 + 100*27 + 112*15 + 124*2 + 136*22/32 + 42 + 12 + 1 + 34 + 39 + 40 + 27 + 15 + 2 + 22
- // = 18500/266
- // = 69.54887218045113
- // [16,32,16*32,-53.54887218045113,2867.4817117982925,91759.41477754536]
- // [28,42,28*42,-41.54887218045113,1726.3087794674657,72504.96873763355]
- // [40,12,40*12,-29.548872180451127,873.1358471366385,10477.630165639663]
- // [52,1,52*1,-17.548872180451127,307.9629148058115,307.9629148058115]
- // [64,34,64*34,-5.548872180451127,30.789982474984445,1046.8594041494712]
- // [76,39,76*39,6.451127819548873,41.617050144157396,1623.0649556221383]
- // [88,40,88*40,18.451127819548873,340.44411781333037,13617.764712533213]
- // [100,27,100*27,30.451127819548873,927.2711854825033,25036.32200802759]
- // [112,15,112*15,42.45112781954887,1802.0982531516763,27031.473797275143]
- // [124,2,124*2,54.45112781954887,2964.9253208208493,5929.8506416416985]
- // [136,22,136*22,66.45112781954887,4415.752388490022,97146.55254678048]
- // [nil," {summation(f)} = 266","{summation(fx)} = [512,1176,480,52,2176,2964,3520,2700,1680,248,2992]",nil,nil,"{summation(sq(x-x_bar))} = 346481.8646616541"]
- // Standard deviation,S = {sqrt{summation(sq(f(x-x_bar)))/n}}
- // = {sqrt(346481.8646616541/266)},
- // = 36.09104322382026
- // Config : [inequality_group_data_freq_table(q,[[[10,22],32],[[22,34],42],[[34,46],12],[[46,58],1],[[58,70],34],[[70,82],39],[[82,94],40],[[94,106],27],[[106,118],15],[[118,130],2],[[130,142],22]])]
- // Qid : 643
- // Concepts_used : [["sd_with_inequality_freq_table",0]]
- // Config_type : ["standard_deviation_ungrouped_freq_table"]
- // Question_type : ["standard_deviation"]
- // ----------------------
- </script>
- </body>
- </html>
- <!-- numberline(xaxis(-5,5),inequality([[5>x>2],[5>=x>2],[5>x>=2],[5>=x>=2],[2<x<=5],[2<=x<=5],[2<x<5],[2<=x<5],[x<5],[x>2],[x<=5],[x>=2]])) -->
- <!-- // line(points(x,y), label(z),type(arrow,3)) -->
- <!-- line(coordinates(point(value(0,2),label(string(X)),name(X)),point(name(Y),value(2,2),label(latex(x^2)))),type(dashed),label(latex(ax+y=c)),head(arrow),tail(hollow_point),ticks([tick(type(line),label(A)),tick(type(line),label(B)),tick(type(arrow),label(C))])) -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement