Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Videos in Problems #1159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 11 additions & 13 deletions Contrib/CCCS/AlgebraicLiteracy/IA_8.4/OpenStax_IA_8.4_165.pg
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#Add or Subtract Radicals
# ENDDESCRIPTION
## DBsubject()
## DBchapter()
## DBsection()
## DBsubject(Algebra)
## DBchapter(Properties of exponents, rational exponents and radicals)
## Date(6/2019)
## Institution(Red Rocks Community College)
## Author(Martha Stevens)
## Date(6/2019)
## KEYWORDS()


DOCUMENT();
Expand All @@ -27,23 +25,23 @@ TEXT(beginproblem());
Context("Numeric");

#Part A
$a = list_random(2, 3, 5, 7);
$b = non_zero_random(-10, 10);
$a = list_random(2, 3, 5, 7, 10);
do{$b = non_zero_random(-10, 10);
$c = non_zero_random(-10, 10);
$d = Compute("$b+$c");
$d = Compute("$b+$c");}until($d !=0);

#Part B
$n = random(3, 6);
$b2 = non_zero_random(-10, 10);
do{
$c2 = non_zero_random(-10, 10);
}until($c2 != -$b2);

$d2 = Compute("$c2 + $b2");
$d2 = Compute("$c2 + $b2");}until($d2 !=0);

Context("LimitedRadical");

$ans1 = Formula("$d*sqrt($a)");
if($d ==1){$ans1 = Formula("sqrt($a)");}
elsif($d ==-1){$ans1 = Formula("-sqrt($a)");}
else{$ans1 = Formula("$d*sqrt($a)");}
$ans2 = Formula("$d2*root($n,x)");

##########################################
Expand All @@ -56,7 +54,7 @@ BEGIN_PGML
Simplify each radical.


(a) [`` [$b]\sqrt{[$a]} + [$c]\sqrt{[$a]} = ``] [_____________]{$ans1->cmp(mathQuillOpts => "rootsAreExponents: false")}
(a) [`` [$b]\sqrt{[$a]} + [$c]\sqrt{[$a]} = ``] [_____________]{$ans1}

(b) [`` [$b2]\sqrt[[$n]]{x} + [$c2]\sqrt[[$n]]{x} = ``] [_____________]{$ans2->cmp(mathQuillOpts => "rootsAreExponents: false")}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ $piecewise =
Row(["\(\displaystyle f(x) = \Bigg\{ \; \)",ans_rule(1).$BR.$BR.ans_rule(1),'\(\displaystyle for \)'.$BR.$BR.'\(\displaystyle for \)',ans_rule(1).$BR.$BR.ans_rule(1), '\( < x < \)'.$BR.$BR. '\( < x < \)', ans_rule(1).$BR.$BR.ans_rule(1)],separation=>1).
EndTable();

$video = MODES(
HTML=>
'<iframe width="420" height="315" src="https://www.youtube.com/embed/AQaKh_1poBI?si=434GxpZTrlifghlN"frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);

BEGIN_TEXT
$BCENTER
\{ image(insertGraph($graph),tex_size => 400, width=>400, height=>400) \}
Expand All @@ -72,8 +79,16 @@ END_TEXT

BEGIN_PGML
[$piecewise]*

[$video]*

END_PGML
BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=AQaKh_1poBI", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT
$slope1 = ($y2- $y1)/($x2 - $x1);
$slope2 = ($y3- $y2)/($x3 - $x2);
$ans1 = FEQ( EV2(" $slope1*(x - $x1) + $y1 ") );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ Context()->noreduce("(-x)-y");

$fun = PiecewiseFunction("$c*x-$d if x < -$b else sqrt(x) if x > $a")->reduce;

$video = MODES(
HTML=>
'<iframe width="420" height="315" src="https://www.youtube.com/embed/B1jfpiI-QQ8?si=y-N2Bm3EMsjziFU0"frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);

##############################################
# Main text

Expand All @@ -68,10 +75,15 @@ Graph the piecewise function to find its domain and range.

Range: [_________________]{$range} [@ AnswerFormatHelp("intervals") @]*


[$video]*

END_PGML
BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=B1jfpiI-QQ8", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT
#Context()->normalStrings;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEXT(beginproblem());
# Setup
$a=random(1000,5000);
$b=non_zero_random(-1,1,.01);

$b = Round($b, 3);
Context("Numeric");

if ($b>0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ $ans1=Compute($a-$b);

$ans2=Compute($f2-$f1);

$video = MODES(
HTML=>
'<iframe width="420" height="315" src="//www.youtube.com/embed/KCDtss0pT_c"frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);

###########################
# Main text
Expand All @@ -92,16 +86,9 @@ For each year [`t`], the number of trees in Forest A is represented by the funct
5. After 30 years, by how many trees will the larger forest exceed the smaller forest? Round to two decimal places.
[_________________]{$ans2}

[$video]*
END_PGML


BEGIN_TEXT
$BR
END_PGML

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=KCDtss0pT_c", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT

############################
# Solution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $ans=List(" 1/$c*ln($b/$a) ");

$video = MODES(
HTML=>
'<iframe width="560" height="315" src="https://www.youtube.com/embed/XBpg0PN6ZG4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
'<iframe width="560" height="315" src="https://www.youtube.com/embed/Y7r0cl6X6mU?si=PUdq8Bsp0vuPC5bk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);
Expand All @@ -62,7 +62,7 @@ END_PGML
BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://youtu.be/XBpg0PN6ZG4", "click here to watch on YouTube.", "TARGET='_blank'")\}
If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=Y7r0cl6X6mU", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ else {
}


$video = MODES(
HTML=>
'<iframe width="420" height="315" src="//www.youtube.com/embed/2RnS3fSHVV8"frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);

###########################
# Main text
Expand All @@ -89,15 +83,10 @@ Solve the rational inequality. Enter the answer in interval notation.

[_______________________________]{$x1} [@ AnswerFormatHelp("intervals") @]*

[$video]*

END_PGML


BEGIN_TEXT
$BR
If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=2RnS3fSHVV8", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT

}
else
Expand All @@ -109,16 +98,9 @@ Solve the rational inequality. Enter the answer in interval notation.

[_______________]{$x1} [@ AnswerFormatHelp("intervals") @]*

[$video]*
END_PGML

END_PGML

BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=2RnS3fSHVV8", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT

}

Expand Down
17 changes: 14 additions & 3 deletions Contrib/CCCS/CollegeAlgebra/Circles/CCD_CCCS_Circles_6.pg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ $radius = sqrt($radicand);
Context("LimitedPoint");
$center=Point("( ($a/2),($b/2) )");


$video = MODES(
HTML=>
'<iframe width="420" height="315" src="https://www.youtube.com/embed/KA4nOBywEpI?si=jeAOTxg7Rg3AHI3o" frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);


###########################
Expand All @@ -66,10 +71,16 @@ Radius:[_______________]{$radius}[@ AnswerFormatHelp("numbers") @]*

Center:[_______________]{$center}[@ AnswerFormatHelp("points") @]*


[$video]*
END_PGML



BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=KA4nOBywEpI", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT

############################
#Answers
Expand Down
13 changes: 1 addition & 12 deletions Contrib/CCCS/CollegeAlgebra/Circles/RRCC_CCCS_Circles_1.pg
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ $f = Formula("(x-$h)^2+(y-$k)^2")->reduce;
Context("LimitedPoint");
$cen = Point("($h,$k)");

$video = MODES(
HTML=>
'<iframe width="420" height="315" src="//www.youtube.com/embed/k5Z3qb052Ek" frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);


###########################
Expand All @@ -66,15 +60,10 @@ Find the center and radius of the following circle. Enter the center as an order
+ radius: [___]{$r} [@ AnswerFormatHelp("numbers") @]*


[$video]*

END_PGML

BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=k5Z3qb052Ek", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT


############################
Expand Down
17 changes: 14 additions & 3 deletions Contrib/CCCS/CollegeAlgebra/Circles/RRCC_CCCS_Circles_5.pg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ $ans1=Formula("(x-$h)^2+(y-$k)^2")->reduce;
$ans2=Formula("$r2");



$video = MODES(
HTML=>
'<iframe width="420" height="315" src="//www.youtube.com/embed/k5Z3qb052Ek" frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);


###########################
# Main text
Expand All @@ -64,10 +70,15 @@ Find the equation for the circle with center [` ([$h],[$k]) `] and passes throug
[_______________] [`=`] [_____________][@ AnswerFormatHelp("numbers") @]*



[$video]*
END_PGML


BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=k5Z3qb052Ek", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT

############################
#Answers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,7 @@ $g=Formula("$c*x+$d")->reduce;
Context("Interval");
if($m>$c){$ans=Compute("($a,infinity)");} else{$ans=Compute("(-infinity,$a)");}

$video = MODES(
HTML=>
'<iframe width="420" height="315" src="//www.youtube.com/embed/xdiBjypYFRQ" frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);

###########################
# Main text

Expand All @@ -62,14 +57,9 @@ Solve [`` [$f] > [$g] ``]. Enter the solution in interval notation.

[_______________]{$ans} [@ AnswerFormatHelp("intervals") @]*

[$video]*

END_PGML
BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=xdiBjypYFRQ", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT


############################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if($d>0){$ans=Compute("(-infinity,$min)U($max,infinity)");} else{$ans=Compute("(

$video = MODES(
HTML=>
'<iframe width="420" height="315" src="//www.youtube.com/embed/ZNtzWpU80-0" frameborder="0" allowfullscreen></iframe>',
'<iframe width="420" height="315" src="//www.youtube.com/embed/xdiBjypYFRQ" frameborder="0" allowfullscreen></iframe>',
TeX =>
"An embedded YouTube video."
);
Expand All @@ -67,7 +67,7 @@ END_PGML
BEGIN_TEXT
$BR

If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?time_continue=135&v=ZNtzWpU80-0", "click here to watch on YouTube.", "TARGET='_blank'")\}
If the video does not work, \{ htmlLink ("https://www.youtube.com/watch?v=xdiBjypYFRQ", "click here to watch on YouTube.", "TARGET='_blank'")\}
$BR
END_TEXT

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ Determine which equation can be used to find the asymptotes for the following gr

Which equation can be used to find the asymptotes for the graph? [_______]{$popup}.

A. `y=\frac{pi}{3} \pm \frac{pi}{2}k`, for any `k` integer.
A. `y=\frac{pi}{3} + \frac{pi}{2}k`, for any `k` integer.


B. `y=\frac{pi}{6}k`, for any `k` integer.


C. `x=\frac{pi}{2} \pm k`, for any `k` integer.
C. `x=\frac{pi}{2} + k`, for any `k` integer.


D. `x=k`, for any `k` integer.


E. `x=kpi \pm k`, for any `k` integer.
E. `x=kpi + k`, for any `k` integer.



Expand Down