Skip to content

Commit 9eac6d1

Browse files
authored
Merge pull request #930 from LBridgers/master
Create SUNYOneonta folder in Contrib folder and add five folders of new problems
2 parents caf4f51 + 3514b28 commit 9eac6d1

File tree

182 files changed

+11835
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+11835
-0
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#Description
2+
#Math for Elementary Education
3+
#End Description
4+
5+
# DBsubject(Shapes)
6+
# DBchapter(Geometry)
7+
# DBsection(Area)
8+
# Date(2/21/22)
9+
# Institution(SUNY Oneonta)
10+
# Level(2)
11+
# KEYWORDS('area','perimeter')
12+
13+
###################################
14+
15+
DOCUMENT();
16+
loadMacros(
17+
"PGstandard.pl",
18+
"PGchoicemacros.pl",
19+
"MathObjects.pl",
20+
"PGgraphmacros.pl",
21+
"PGauxiliaryFunctions.pl", #for lcm, gcd,etc
22+
);
23+
24+
# make sure we're in the context we want
25+
Context("Numeric");
26+
27+
$a = random(2,4,1);
28+
$b = random(5,6,1);
29+
30+
($WIDTH,$HEIGHT,$TEXSIZE)=(270,370,300);
31+
# now initialize the graph
32+
$graph = init_graph(-.6,-.6, 2.1,3.1,size=>[$WIDTH,$HEIGHT]);
33+
34+
$graph->moveTo(.5,0);
35+
$graph->lineTo(.5 ,3 ,'gray');
36+
$graph->moveTo(1,0);
37+
$graph->lineTo(1 ,1.5 ,'gray');
38+
$graph->moveTo(1.5,0);
39+
$graph->lineTo(1.5 ,1.5 ,'gray');
40+
$graph->moveTo(0,.5);
41+
$graph->lineTo(2 ,.5 ,'gray');
42+
$graph->moveTo(0,1);
43+
$graph->lineTo(2 ,1 ,'gray');
44+
$graph->moveTo(1,1.5);
45+
$graph->lineTo(0 ,1.5 ,'gray');
46+
$graph->moveTo(0,2);
47+
$graph->lineTo(1 ,2 ,'gray');
48+
$graph->moveTo(0,2.5);
49+
$graph->lineTo(1 ,2.5 ,'gray');
50+
51+
52+
$graph->moveTo(0,0);
53+
$graph->lineTo(2 ,0 ,'black');
54+
$graph->lineTo(2 ,1.5 ,'black');
55+
$graph->lineTo(1 ,1.5 ,'black');
56+
$graph->lineTo(1 ,3 ,'black');
57+
$graph->lineTo(0 ,3 ,'black');
58+
$graph->lineTo(0 ,0 ,'black');
59+
60+
$graph->moveTo(-.1,0);
61+
$graph->lineTo(-.1 ,.5 ,'black');
62+
$graph->moveTo(0,-.2);
63+
$graph->lineTo(0,0 ,'black');
64+
$graph->lineTo(-.2 ,0 ,'black');
65+
$graph->moveTo(0,-.1);
66+
$graph->lineTo(.5 ,-.1 ,'black');
67+
$graph->moveTo(.5,-.2);
68+
$graph->lineTo(.5 ,0 ,'black');
69+
$graph->moveTo(0,.5);
70+
$graph->lineTo(-.2 ,.5 ,'black');
71+
72+
73+
$label1= new Label(-.3 , .35 , "$a ft" ,'black',('center','center'));
74+
$label1->font(GD::Font->Giant);
75+
$graph -> lb($label1);
76+
$label2= new Label(.25 ,-.15 , "$b ft",'black',('center','center'));
77+
$label2->font(GD::Font->Giant);
78+
$graph -> lb($label2);
79+
80+
81+
$ans1 = Compute("12*$a+8*$b");
82+
$ans2 =Compute("18*$a*$b");
83+
84+
85+
###########################################
86+
BEGIN_TEXT
87+
A garden is pictured below.
88+
$BR
89+
\{ image( insertGraph($graph), tex_size=>$TEXSIZE,
90+
height=>$HEIGHT, width=>$WIDTH
91+
) \}
92+
93+
$PAR
94+
What is the perimeter of the garden? \{ans_rule(20)\}
95+
$PAR
96+
What is the area of the garden? \{ans_rule(20)\}
97+
98+
END_TEXT
99+
#########################################
100+
ANS(num_cmp($ans1, units=>'ft'));
101+
ANS(num_cmp($ans2, units=>'ft^2'));
102+
103+
104+
105+
106+
107+
COMMENT('MathObject version');
108+
ENDDOCUMENT();
109+
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#Description
2+
#Math for Elementary Education
3+
#End Description
4+
5+
# DBsubject(Shapes)
6+
# DBchapter(Geometry)
7+
# DBsection(Area)
8+
# Date(2/21/22)
9+
# Institution(SUNY Oneonta)
10+
# Level(2)
11+
# KEYWORDS('area','perimeter')
12+
13+
###################################
14+
15+
DOCUMENT();
16+
loadMacros(
17+
"PGstandard.pl",
18+
"PGchoicemacros.pl",
19+
#"PGgraphmacros.pl",
20+
"MathObjects.pl",
21+
# "compoundProblem.pl",
22+
#"contextCurrency.pl",
23+
#"contextInequalities.pl",
24+
#"unionTables.pl",
25+
# "unionLists.pl",
26+
#"unionMacros.pl",
27+
#"contextLeadingZero.pl",
28+
#"contextFraction.pl",
29+
#"answerHints.pl",
30+
#"problemPanic.pl",
31+
#"PGauxiliaryFunctions.pl", #for lcm, gcd,etc
32+
);
33+
#for currency use Context("Currency") then Currency($A);
34+
#Then, in the text use $DOLLAR $a
35+
TEXT(beginproblem());
36+
$showPartialCorrectAnswers = 1;
37+
Context("Numeric");
38+
39+
$d = random(5,13,2);
40+
$r = $d/2;
41+
$ans1 = Compute(pi*$d);
42+
$ans2 = Compute(pi*$r*$r);
43+
44+
##############################################
45+
BEGIN_TEXT
46+
The base of a circular pool has a diameter of \($d cm \).
47+
$PAR
48+
What is circumference of the pool?
49+
\{ans_rule(20)\}
50+
$PAR
51+
What is the area of bottom of the pool?
52+
\{ans_rule(20)\}
53+
54+
55+
END_TEXT
56+
##########################################
57+
ANS(num_cmp($ans1, units=>'cm'));
58+
ANS(num_cmp($ans2, units=>'cm^2'));
59+
60+
COMMENT('MathObject version');
61+
ENDDOCUMENT();
62+
63+
64+
## DBsubject('NECAP')
65+
## DBchapter('Grade 8')
66+
## DBsection('2008')
67+
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#Description
2+
#Math for Elementary Education
3+
#End Description
4+
5+
# DBsubject(Shapes)
6+
# DBchapter(Geometry)
7+
# DBsection(Area)
8+
# Date(2/21/22)
9+
# Institution(SUNY Oneonta)
10+
# Level(2)
11+
# KEYWORDS('area','perimeter')
12+
13+
###################################
14+
15+
DOCUMENT();
16+
loadMacros(
17+
"PGstandard.pl",
18+
"PGchoicemacros.pl",
19+
"MathObjects.pl",
20+
"PGgraphmacros.pl",
21+
"PGauxiliaryFunctions.pl", #for lcm, gcd,etc
22+
);
23+
24+
# make sure we're in the context we want
25+
Context("Numeric");
26+
27+
$a = random(12,24,2);
28+
$b = random(10,16,1);
29+
30+
$ans1 = Compute("2*$b+$a+pi*$a/2");
31+
$ans2 = Compute("$a*$b+.5*pi*($a/2)^2");
32+
33+
($WIDTH,$HEIGHT,$TEXSIZE)=(240,360,150);
34+
# now initialize the graph
35+
$graph = init_graph(-.1,-.3, 2.7,3.3,size=>[$WIDTH,$HEIGHT]);
36+
$graph->moveTo(0,2);
37+
$graph->lineTo(0 ,0 ,'black');
38+
$graph->lineTo(2 ,0 ,'black');
39+
$graph->lineTo(2 ,2 ,'black');
40+
#$graph->lineTo(0 ,2 ,'black');
41+
42+
$black=$graph->im->colorAllocate(0,0,0);
43+
$graph->im->arc(94,132,172,172,180,360,$black);
44+
45+
$label1= new Label(1 ,-.1 , "$a in",'black',('center','center'));
46+
$label1->font(GD::Font->Giant);
47+
$graph -> lb($label1);
48+
$label2= new Label(2.3 ,1 , "$b in",'black',('center','center'));
49+
$label2->font(GD::Font->Giant);
50+
$graph -> lb($label2);
51+
52+
#NOTE Actual size of box is in the image below
53+
54+
55+
56+
57+
58+
TEXT(beginproblem());
59+
60+
61+
###################################################
62+
BEGIN_TEXT
63+
64+
65+
\{ image( insertGraph($graph), tex_size=>$TEXSIZE,
66+
height=>$HEIGHT, width=>$WIDTH
67+
) \}
68+
$PAR
69+
The shape shown above is made up of a rectangle with semicircle attached.
70+
$PAR
71+
What is the perimeter of the shape? Include units.$BR \{ans_rule(20 )\}
72+
$PAR
73+
What is the area of the shape? Include units. $BR \{ans_rule(20 )\} $PAR
74+
Note: The drawing is not to scale
75+
END_TEXT
76+
#######################################################
77+
ANS(num_cmp($ans1, units=>'in'));
78+
ANS(num_cmp($ans2, units=>'in^2'));
79+
80+
81+
82+
83+
84+
85+
COMMENT('MathObject version');
86+
ENDDOCUMENT();
87+
## DBsubject('NECAP')
88+
## DBchapter('Grade 8')
89+
## DBsection('2009')
90+
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
#Description
2+
#Math for Elementary Education
3+
#End Description
4+
5+
# DBsubject(Shapes)
6+
# DBchapter(Geometry)
7+
# DBsection(Area)
8+
# Date(2/21/22)
9+
# Institution(SUNY Oneonta)
10+
# Level(2)
11+
# KEYWORDS('area','perimeter')
12+
13+
###################################
14+
15+
DOCUMENT();
16+
loadMacros(
17+
"PGstandard.pl",
18+
"PGchoicemacros.pl",
19+
"MathObjects.pl",
20+
"PGgraphmacros.pl",
21+
"PGauxiliaryFunctions.pl", #for lcm, gcd,etc
22+
);
23+
24+
# make sure we're in the context we want
25+
Context("Numeric");
26+
27+
28+
29+
$a = random(2,7,1);
30+
$b1 = random(2,5,1);
31+
$c = random(3,8,1);
32+
$b = $c+$b1;
33+
$d = "$b1^2+$a^2";
34+
35+
$ans1 = Compute("$b+$c+sqrt($d)+.5*pi*$a");
36+
$ans2 =Compute("$a*$c-.5*pi*($a/2)^2+.5*$a*$b1");
37+
38+
($WIDTH,$HEIGHT,$TEXSIZE)=(270,370,300);
39+
# now initialize the graph
40+
$graph = init_graph(-.9,-.6, 3.2,4,size=>[$WIDTH,$HEIGHT]);
41+
42+
43+
$black=$graph->im->colorAllocate(0,0,0);
44+
$graph->im->arc(125,79,132,-132,180,360,$black);
45+
46+
47+
$graph->moveTo(0,1);
48+
$graph->lineTo(2 ,0 ,'black');
49+
$graph->lineTo(2 ,3 ,'black');
50+
#$graph->lineTo(1 ,1.5 ,'black');
51+
#$graph->lineTo(1 ,3 ,'black');
52+
#$graph->lineTo(0 ,3 ,'black');
53+
$graph->moveTo(0,3);
54+
$graph->lineTo(0 ,1 ,'black');
55+
56+
$graph->moveTo(0,1);
57+
$graph->lineTo(2 ,1 ,'gray');
58+
$graph->moveTo(-.2,1);
59+
$graph->lineTo(0,1 ,'gray');
60+
$graph->moveTo(-.2,3);
61+
$graph->lineTo(0,3,'gray');
62+
$graph->moveTo(-.1,1);
63+
$graph->lineTo(-.1,3,'gray');
64+
#$graph->moveTo(0,-.1);
65+
#$graph->lineTo(2 ,-.1 ,'gray');
66+
#$graph->moveTo(2,-.2);
67+
#$graph->lineTo(2 ,0 ,'gray');
68+
#$graph->moveTo(0,0);
69+
#$graph->lineTo(0 ,-.2 ,'gray');
70+
$graph->moveTo(2,0);
71+
$graph->lineTo(2.2,0 ,'gray');
72+
$graph->moveTo(2.1,0);
73+
$graph->lineTo(2.1,3 ,'gray');
74+
$graph->moveTo(2,3);
75+
$graph->lineTo(2.2,3 ,'gray');
76+
77+
78+
$label1= new Label(-.5 , 2 , "$c ft" ,'black',('center','center'));
79+
$label1->font(GD::Font->Giant);
80+
$graph -> lb($label1);
81+
$label2= new Label(1 ,1.15 , "$a ft",'black',('center','center'));
82+
$label2->font(GD::Font->Giant);
83+
$graph -> lb($label2);
84+
$label3= new Label(2.5 ,1.5 , "$b ft",'black',('center','center'));
85+
$label3->font(GD::Font->Giant);
86+
$graph -> lb($label3);
87+
88+
89+
90+
91+
###########################################
92+
BEGIN_TEXT
93+
94+
$BR
95+
\{ image( insertGraph($graph), tex_size=>$TEXSIZE,
96+
height=>$HEIGHT, width=>$WIDTH
97+
) \}
98+
$PAR
99+
100+
101+
102+
103+
104+
$PAR
105+
What is the perimeter of the shape? Include units. $BR \{ans_rule(20)\}
106+
$PAR
107+
What is the area of the shape? Include units. $BR \{ans_rule(20)\}
108+
$PAR
109+
Note: The drawing is not to scale
110+
END_TEXT
111+
#########################################
112+
ANS(num_cmp($ans1, units=>'ft'));
113+
ANS(num_cmp($ans2, units=>'ft^2'));
114+
115+
116+
117+
118+
119+
COMMENT('MathObject version');
120+
ENDDOCUMENT();
121+

0 commit comments

Comments
 (0)