Skip to content

Commit 7cc4601

Browse files
committed
Merge branch 'master' of github.com:openwebwork/webwork-open-problem-library
2 parents bce1b5d + 044f193 commit 7cc4601

File tree

16 files changed

+268
-45
lines changed

16 files changed

+268
-45
lines changed

Contrib/CCCS/AlgebraicLiteracy/IA_9.5/OpenStax_IA_9.5_203.pg

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,26 @@ $a2 = -$c;
4949
$height = Compute("(-$b + sqrt($b**2 - 4*$a*$c))/(2*$a)");
5050
$base = Compute("2*$height + $m");
5151

52+
$heightr = Round($height,1);
53+
$heightr = Compute ($heightr)->with(
54+
tolType => 'absolute',
55+
tolerance => 0.005,
56+
);
5257

58+
$baser = Round($base,1);
59+
$baser = Compute ($baser)->with(
60+
tolType => 'absolute',
61+
tolerance => 0.005,
62+
);
5363
###########################
5464
# Main text
5565

5666
BEGIN_PGML
57-
The area of a triangular flower bed in the park is [`[$A]`] square feet. The base is [`[$m]`] feet longer than twice the height. Find the base and height. Round to the nearest tenth.
67+
The area of a triangular flower bed in the park is [`[$A]`] square feet. The base is [`[$m]`] feet longer than twice the height. Find the base and height. Do not round until the end, then round to the nearest tenth of a foot.
5868

59-
Height = [_______________]{$height}feet
69+
Height = [_______________]{$heightr}feet
6070

61-
Base = [_______________]{$base}feet
71+
Base = [_______________]{$baser}feet
6272

6373
[@ AnswerFormatHelp("numbers") @]*
6474

@@ -95,6 +105,8 @@ Only the positive solution makes sense, so [`x = [$height]`].
95105

96106
The base is [`b = 2\cdot [$height] + [$m] = [$base]`]
97107

108+
Then rounding each of these to the nearest tenth gives [`b = [$baser]`] feet, [`h = [$heightr]`] feet.
109+
98110
END_PGML_SOLUTION
99111

100112
COMMENT('MathObject version. Uses PGML.');

Contrib/CCCS/AlgebraicLiteracy/IA_9.5/OpenStax_IA_9.5_209.pg

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,19 @@ $i = random(0, 3);
4646

4747
$ans1 = $a/sqrt($n[$i]**2 - 1);
4848
$ans2 = $n[$i]*$ans1;
49+
$ans1r = Round($ans1,1);
50+
$ans1r = Compute ($ans1r)->with(
51+
tolType => 'absolute',
52+
tolerance => 0.005,
53+
);
54+
$ans2r = Round($ans2,1);
55+
$ans2r = Compute ($ans2r)->with(
56+
tolType => 'absolute',
57+
tolerance => 0.005,
58+
);
4959

50-
$ans = List($ans1, $ans2);
60+
61+
$ans = List($ans1r, $ans2r);
5162

5263
#for solution
5364
$asq = $a**2;
@@ -59,7 +70,7 @@ $bsq = Compute("$asq/$coeff");
5970
# Main text
6071

6172
BEGIN_PGML
62-
The hypotenuse of a right triangle is [$number[$i]] times the length of one of its legs. The length of the other leg is [`[$a]`] feet. Find the lengths of the other two sides of the triangle. Enter your answers as a comma separated list. Round to the nearest tenth.
73+
The hypotenuse of a right triangle is [$number[$i]] times the length of one of its legs. The length of the other leg is [`[$a]`] feet. Find the lengths of the other two sides of the triangle. Enter your answers as a comma separated list. Do not round until the end, then round to the nearest tenth.
6374

6475
[_______________]{$ans}feet
6576

@@ -90,9 +101,11 @@ This is a right triangle, so we can use the pythagorean formula to set up an equ
90101

91102
[`x^2 = [$bsq]`]
92103

93-
[`x = \sqrt{[$bsq]} = [$ans1]`]
104+
[`x = \sqrt{[$bsq]} \approx [$ans1]`]
105+
106+
The hypotenuse is [`4 \cdot \sqrt{[$bsq]} \approx [$ans2]`].
94107

95-
The hypotenuse is [`4 \cdot [$ans1] = [$ans2]`].
108+
Then rounding both of these to the nearest tenth we have the lengths of the other two sides are: [`[$ans1r], [$ans2r]`] feet.
96109

97110
END_PGML_SOLUTION
98111

Contrib/CCCS/AlgebraicLiteracy/IA_9.5/OpenStax_IA_9.5_213.pg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ Context()->flags->set(
4141
$c = random(20, 30);
4242
$a = random(4, 8);
4343
$b = sqrt($c**2 - $a**2);
44+
$b = Round($b,1);
45+
$b = Compute ($b)->with(
46+
tolType => 'absolute',
47+
tolerance => 0.005,
48+
);
4449

4550
#for solution
4651
$asq = $a**2;
@@ -79,7 +84,7 @@ When the ladder leans against the wall, it creates a right triangle. We can use
7984

8085
[`x^2 = [$diff]`]
8186

82-
[`x = \sqrt{[$diff]} = [$b]`]
87+
[`x = \sqrt{[$diff]} \approx [$b]`] feet.
8388
END_PGML_SOLUTION
8489

8590
COMMENT('MathObject version. Uses PGML.');

Contrib/CCCS/AlgebraicLiteracy/IA_9.5/OpenStax_IA_9.5_216.pg

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ $showPartialCorrectAnswers = 1;
3333
# Setup
3434

3535
Context()->variables->add(t=>"Real");
36-
Context()->flags->set(
37-
tolerance => 0.0051,
38-
tolType => "absolute",
39-
);
40-
4136

4237
$v0 = random(150, 300, 10);
4338
$h0 = random(3, 6);
44-
$t = Compute("(-$v0 - sqrt($v0^2 + 64*$h0))/-32");
39+
40+
$t = Compute("(-$v0 - sqrt($v0**2 + 64*$h0))/-32");
41+
$t = Round($t,2);
42+
$t = Compute ($t)->with(
43+
tolType => 'absolute',
44+
tolerance => 0.0005,
45+
);
4546

4647
#for solution
4748
$v02 = $v0**2;
@@ -57,7 +58,7 @@ An arrow is shot vertically upward at a rate of [`[$v0]`] feet per second from a
5758

5859
[``h = -16t^2 + [$v0]t + [$h0]``]
5960

60-
When will the arrow hit the ground? Round to the nearest hundredth.
61+
When will the arrow hit the ground? Round to the nearest hundredth of a second.
6162

6263
[_______________]{$t}seconds
6364

Contrib/CCCS/CalculusOne/05.7/CCD_CCCS_Openstax_Calc1_C1-2016-002_5_7_398.pg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ $showPartialCorrectAnswers = 1;
3131

3232
$a = random(4,36,1);
3333
$b = random(1,10,1);
34-
$ans=FormulaUpToConstant("$b/sqrt($a)asin(sqrt($a)*x)+C")->reduce()->with(limits=>[0.00001,0.001]);
35-
34+
$ans=FormulaUpToConstant("$b/sqrt($a)asin(sqrt($a)*x)+C")->reduce()->with(limits=>[-1/sqrt($a),1/sqrt($a)]); #this is the domain of the solutiob asin(sqrt($a)*x)
3635

3736
BEGIN_PGML
3837
Evaluate the following indefinite integral.

Contrib/CCCS/CollegeAlgebra/2.2/RRCC_CCCS_Openstax_AlgTrig_AT-1-001-AS_2_2_6.pg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,22 @@ $d = non_zero_random(-9,9,1);
4242

4343
$answer1 =($d-$b)/($a-$c);
4444

45+
$video= MODES(
46+
HTML=>
47+
'<iframe width="560" height="315" src="https://www.youtube.com/embed/E5JE4DcYx2U" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
48+
TeX=> "An embedded YouTube video"
49+
);
4550
###########################
4651
# Main text
52+
BEGIN_TEXT
53+
54+
$video;
55+
$BR
56+
END_TEXT
4757

4858
BEGIN_PGML
59+
60+
4961
Solve the following equation for [`x`]:
5062

5163
[`[$a]x+[$b]=[$c]x+[$d]`]

Contrib/NAU/setCalcIII/DrAcula.pg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ c. The gradient of \( S \) is \( \nabla S(r,h) = \) ( \{ $ans3->ans_rule(15)\}
6060
$PAR
6161
d. The gradient of \( V \) is \( \nabla V(r,h) = \) ( \{ $ans5->ans_rule(15)\} , \{ $ans6->ans_rule(15)\} ).
6262
$PAR
63-
In the last century it became fashionable to serve plasma in cans that have a volume of \( $v \) cubic huvelyk. Dr. Acula likes to follow current trends.
63+
In the last century it became fashionable to serve plasma in cans that have a volume of \( $v \) cubic inches. Dr. Acula likes to follow current trends.
6464
$PAR
65-
e. The best choice for the radius of the can is \( r_{\text{opt}} = \) \{ $ans7->ans_rule(15)\} huvelyk.
65+
e. The best choice for the radius of the can is \( r_{\text{opt}} = \) \{ $ans7->ans_rule(15)\} inches.
6666
$PAR
67-
f. The best choice for the height of the can is \( h_{\text{opt}} = \) \{ $ans8->ans_rule(15)\} huvelyk.
67+
f. The best choice for the height of the can is \( h_{\text{opt}} = \) \{ $ans8->ans_rule(15)\} inches.
6868
$PAR
69-
g. The surface area of the can cannot be smaller than \( S(r_{\text{opt}},h_{\text{opt}}) = \) \{ $ans9->ans_rule(35)\} square huvelyk.
69+
g. The surface area of the can cannot be smaller than \( S(r_{\text{opt}},h_{\text{opt}}) = \) \{ $ans9->ans_rule(35)\} square inches.
7070

7171

7272
END_TEXT
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
##DESCRIPTION
2+
## DBsubject(Geometry)
3+
## DBchapter(Vector geometry)
4+
## DBsection(Cross product)
5+
## Institution(NAU)
6+
## Author(Nandor Sieben)
7+
## Level(3)
8+
## MO(1)
9+
##ENDDESCRIPTION
10+
# File Created: 1/16/22
11+
12+
13+
DOCUMENT();
14+
15+
loadMacros(
16+
"PGstandard.pl",
17+
"MathObjects.pl",
18+
"AnswerFormatHelp.pl",
19+
"unorderedAnswer.pl",
20+
);
21+
22+
TEXT(beginproblem());
23+
24+
Context("Numeric");
25+
26+
$p = random(0,9,1);
27+
28+
$answer1 = Compute("-sqrt(1+$p)");
29+
$answer2 = Compute("sqrt(1+$p)");
30+
31+
Context()->texStrings;
32+
BEGIN_TEXT
33+
Let \( x=(a,2,$p) \) and \( y=(1,2,a)\). Find \( a \) if the second component of \( x\times y \) is \( -1 \).
34+
$BR
35+
\( a = \)
36+
\{ ans_rule(5) \}
37+
or
38+
\( a = \)
39+
\{ ans_rule(5) \}
40+
END_TEXT
41+
Context()->normalStrings;
42+
43+
$showPartialCorrectAnswers = 1;
44+
45+
UNORDERED_ANS(
46+
$answer1->cmp(),
47+
$answer2->cmp(),
48+
);
49+
50+
ENDDOCUMENT();

Contrib/NAU/setCalcIII/divergence2D.pg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
##DESCRIPTION
22
## DBsubject(Calculus - multivariable)
33
## DBchapter(Fundamental theorems)
4-
## DBsection(Divergence theorem)
4+
## DBsection(Green's theorem)
55
## Institution(NAU)
66
## Author(Nandor Sieben)
7-
## Level(2)
7+
## Level(3)
88
## MO(1)
99
##ENDDESCRIPTION
1010
# File Created: 4/2/17
@@ -28,7 +28,7 @@ TEXT(beginproblem());
2828

2929
Context()->texStrings;
3030
BEGIN_TEXT
31-
Let \(F(x,y)=($a x , $b y ) \). Find the area of the region \( R\subseteq \mathbb{R}^2 \) if the flux of \( F \) through the boundary \(\partial R \) of \( R \) is \(\int_{\partial R}F\cdot N = $c \).
31+
Let \(F(x,y)=($a x , $b y ) \). Find the area of the closed, bounded region \( R\subseteq \mathbb{R}^2 \) if the flux of \( F \) through the boundary \(\partial R \) of \( R \) is \(\int_{\partial R}F\cdot N = $c \).
3232
$BR
3333
area\( (R)= \) \{ ans_rule(35) \}
3434

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
##DESCRIPTION
2+
## DBsubject(Geometry)
3+
## DBchapter(Vector geometry)
4+
## DBsection(Dot product, length, and unit vectors)
5+
## Institution(NAU)
6+
## Author(Nandor Sieben)
7+
## Level(3)
8+
## MO(1)
9+
##ENDDESCRIPTION
10+
# File Created: 1/16/22
11+
12+
13+
DOCUMENT();
14+
15+
loadMacros(
16+
"PGstandard.pl",
17+
"MathObjects.pl",
18+
"AnswerFormatHelp.pl",
19+
"unorderedAnswer.pl",
20+
);
21+
22+
TEXT(beginproblem());
23+
24+
Context("Numeric");
25+
26+
$answer1 = Compute("-1/2");
27+
$answer2 = Compute("1");
28+
29+
Context()->texStrings;
30+
BEGIN_TEXT
31+
Find \( x \) if the vectors \( (x-3,x+3,1) \) and \( (x,x-1,2)\) are orthogonal.
32+
$BR
33+
\( x = \)
34+
\{ ans_rule(5) \}
35+
or
36+
\( x = \)
37+
\{ ans_rule(5) \}
38+
END_TEXT
39+
Context()->normalStrings;
40+
41+
$showPartialCorrectAnswers = 1;
42+
43+
UNORDERED_ANS(
44+
$answer1->cmp(),
45+
$answer2->cmp(),
46+
);
47+
48+
ENDDOCUMENT();

0 commit comments

Comments
 (0)