-
-
Notifications
You must be signed in to change notification settings - Fork 436
Expand file tree
/
Copy pathjj3.pg
More file actions
96 lines (76 loc) · 2.47 KB
/
Copy pathjj3.pg
File metadata and controls
96 lines (76 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
## DESCRIPTION
## Precalculus: Exponential and Logarithm Functions
## ENDDESCRIPTION
## Tagged by cmd6a 3/12/06
## DBsubject(Algebra)
## DBchapter(Exponential and logarithmic expressions and functions)
## DBsection(Graphs)
## Institution(ASU)
## MLT(Expo_match_graphs)
## Level(2)
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl",
"PGchoicemacros.pl",
"PGasu.pl",
"PGgraphmacros.pl",
"extraAnswerEvaluators.pl",
"PGcourse.pl"
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 0;
install_problem_grader(~~&std_problem_grader);
$a = random(2,7);
$b = random(2, 8);
$ym = max(10, $a+$b);
$graph1 = init_graph(-3,-1,3,$ym,
'axes'=>[0,0],
'ticks'=>[6,$ym+1]);
$graph2 = init_graph(-3,-1,3,$ym,
'axes'=>[0,0],
'ticks'=>[6,$ym+1]);
$graph3 = init_graph(-3,-$ym,3,1,
'axes'=>[0,0],
'ticks'=>[6,$ym+1]);
$graph4 = init_graph(-3,-1,3,$ym,
'axes'=>[0,0],
'ticks'=>[6,$ym+1]);
plot_functions( $graph1,
"$a^x for x in <-3, 3> using color:blue and weight:2");
plot_functions( $graph2,
"$a^(-x) for x in <-3, 3> using color:blue and weight:2");
plot_functions( $graph3,
"-($a^x) for x in <-3, 3> using color:blue and weight:2");
plot_functions( $graph4,
"$a^x+$b for x in <-3, 3> using color:blue and weight:2");
for $j1 (-6..5) {
$j = $j1/2;
$j2 = $j+0.25;
plot_functions( $graph4,
"$b for x in <$j, $j2> using color:black and weight:1");
}
$ml = new_match_list();
$ml->qa("\($a^x\)", image(insertGraph($graph1),
alt=>"Exponential decay curve y = a^(-x) decreasing from upper left to lower right, approaching the x-axis as x increases."
),
"\($a^{-x}\)", image(insertGraph($graph2),
alt=>"Exponential decay curve of a^(-x), decreasing from upper left to lower right, approaching the x-axis as x increases."
),
"\(-$a^x\)", image(insertGraph($graph3),
alt=>"Exponential function y = a^x + b shifted upward, with horizontal dashed line indicating the asymptote at y = b."
),
"\($a^x+$b\)", image(insertGraph($graph4),
alt=>"Exponential function shifted up, showing y = a^x + b with horizontal asymptote at y = b indicated by dashed segments."
));
$ml->choose(4);
BEGIN_TEXT
For each function, enter the letter of the matching graph below,
$BR$BR
\{ $ml->print_q() \}
$BR$BR
$BBOLD Note:$EBOLD you can get a larger view of any graph by clicking on it.
$BR$BR
\{ $ml->print_a() \}
END_TEXT
ANS(str_cmp($ml->ra_correct_ans()));
ENDDOCUMENT(); # This should be the last executable line in the problem.