From: Arnie P. v. a. <we...@ma...> - 2008-06-26 19:00:30
|
Log Message: ----------- adding prob14 from setOrientation to modelCourse Added Files: ----------- webwork2/courses.dist/modelCourse/templates/setOrientation/prob14: prob14-hint.html prob14.gif prob14.pg Revision Data ------------- --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob14/prob14-hint.html @@ -0,0 +1,35 @@ +<HEAD> +<TITLE>WeBWork Set 0 Problem 11 Hint</TITLE> +</HEAD> +<BODY BGCOLOR="#EFEFEF"> + +<BLOCKQUOTE> +<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#AAAAAA"> +<TR><TD><TABLE BORDER="1" CELLSPACING="1" CELLPADDING="15" BGCOLOR="#E8E8E8"> +<TR><TD> + +<CENTER><H2>Graphs in WeBWorK</H2></CENTER> + +Often in WeBWorK, the graphs are displayed as small thumbnail images. +These can be difficult to read, so in these cases, WeBWorK provides +you with a link to a larger copy of the graph. You can click on the +small version of the image to get the larger one. For example, click +on the diagram below to enlarge it. It will be displayed in a +separate window; close that window when you are done looking at the +larger graph. +<p> + +<CENTER> +<A HREF="prob14.gif" TARGET="ZOOM"><IMG SRC="prob14.gif" WIDTH="100" HEIGHT="100" BORDER="2"></A> +</CENTER> +<p> + +After you are done, press the "Back" button to go back to the problem page. + +</TD></TR> +</TABLE></TD></TR> +</TABLE> +</BLOCKQUOTE> + +</BODY> +</HTML> --- /dev/null +++ courses.dist/modelCourse/templates/setOrientation/prob14/prob14.pg @@ -0,0 +1,116 @@ +DOCUMENT(); # This should be the first executable line in the problem. + +loadMacros( + "PGstandard.pl", + "PGchoicemacros.pl", + "PGgraphmacros.pl", + "PGunion.pl", + "imageChoice.pl", + "../parserOrientation.pl", + "PGcourse.pl" +); + +# +# You need to change this to point to where you have stored the hint +# and graphic files. +# +$htmlWebworkURL = "http://omega.math.union.edu/webwork2_files/local"; +$hintURL = "${htmlWebworkURL}/parserOrientation/prob14-hint.html"; + +TEXT(beginproblem); + +Title("Matching Graphs in $WW"); + +############################################## + +$ml = new_image_match_list(link => 0, border => 0); +$ml->{separation} = 3; + +@Goptions = (-6,-6,6,6, axes => [0,0], grid => [6,6], size => [150,150]); +$G1 = init_graph(@Goptions); +$G2 = init_graph(@Goptions); +$G3 = init_graph(@Goptions); +$G4 = init_graph(@Goptions); + +$a1 = random(-6,2,.1); $b1 = random($a1+1,6,.1); $m1 = ($b1-$a1)/12; +$a2 = random(-2,6,.1); $b2 = random($a2-1,-6,.1); $m2 = ($b2-$a2)/12; +$a3 = non_zero_random(.5,5,.1)*non_zero_random(-1,1,1); +$a4 = non_zero_random(.5,5,.1)*non_zero_random(-1,1,1); + +$plotoptions = "using color:red and weight=2"; +plot_functions($G1,"$m1(x+6)+$a1 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G2,"$m2(x+6)+$a2 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G3,"$a3 for x in <-5.8,5.8> $plotoptions"); +plot_functions($G4,"10000(x-$a4) for x in <-5.8,5.8> $plotoptions"); + +$ml->qa( + "The line is the graph of an increasing function", $G1, + "The line is the graph of a decreasing function", $G2, + "The line is the graph of a constant function", $G3, + "The line is not the graph of a function", $G4 +); + +$ml->choose(4); + +#BEGIN_TEXT +# +#The simplest functions are the ${BITALIC}linear$EITALIC ones --- +#the functions whose graphs are straight lines. They are important +#because many functions locally look like straight lines. (Looking +#like a line ${BITALIC}locally$EITALIC means that if we zoom in on the +#function and look at it at a very powerful magnification, it will look +#like a straight line.) +#$PAR + +BEGIN_TEXT + +Enter the letter of the graph that corresponds to each statement: +$PAR + +$BCENTER +$PAR +\{$ml->print_q\} +$PAR +$ECENTER + +\{$ml->print_a\} +$PAR + +END_TEXT + +ANS(str_cmp($ml->ra_correct_ans)); +install_problem_grader(~~&std_problem_grader); +$showPartialCorrectAnswers = 0; + +################################################## + +BEGIN_TEXT + +As with the previous matching problems, you will not be told which of +your answers are correct when you submit your answers to this problem. +$WW will only tell you if ${BITALIC}all${EITALIC} your answers are +correct or not. +$PAR + +Some $WW problems display a link to additional information or a +\{htmlLink($hintURL,"hint")\}. Follow this link for a hint about +graphs in $WW. +$PAR + +END_TEXT + +#Occasionally, a problem includes a hint that will not be available +#immediately. Once you have submitted incorrect answers a certain +#number of times (determined by the problem), you will see a ${LQ}Show +#Hint$RQ button above the submit buttons at the bottom of the screen. +#Check the box and press ${LQ}Submit$RQ in order to get the hint. For +#this problem, the hint will be available after one wrong answer. +# +#END_TEXT +# +#$showHint = 1; +#HINT("$HINT Usually the hints are more helpful than this."); + +################################################## + +ENDDOCUMENT(); # This should be the last executable line in the problem. |