-
Notifications
You must be signed in to change notification settings - Fork 34
/
MyQ.pg
68 lines (49 loc) · 1.71 KB
/
MyQ.pg
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
##DESCRIPTION
## Truss analysis
##ENDDESCRIPTION
##KEYWORDS('trusses')
## DBsubject('Electrical Engineering')
## DBchapter('Circuit Analysis')
## DBsection('Op Amps')
## Date('2017/Dec/04')
## Author('D. Breid')
## Institution('University of British Columbia')
########################################################################
DOCUMENT();
loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
);
# Print problem number and point value (weight) for the problem
TEXT(beginproblem());
# Show which answers are correct and which ones are incorrect
$showPartialCorrectAnswers = 1;
$refreshCachedImages = 1;
##############################################################
#
# Setup
#
#
Context("Numeric");
Context()->flags->set(tolerance => .02);
$w_distrib = (random(2.2, 5.5. 0.1));
$w_mobile = random(4,7,0.1);
$Ra=(3*$w_distrib+2*$w_mobile)/2;
##############################################################
#
# PGML Area
#
#
BEGIN_PGML
The Oscar-Mayer Weinermobile which weighs [$w_mobile] tons crosses a bridge of questionable integrity. The bridge has a distributed weight, represented by [$w_distrib]-kip forces at each of points C, E, and G.
Determine the reaction at point A.
[@ image( "MyQ.JPG", width=>506, height=>292) @]*
Enter your answer Ra = [______]{$Ra} kips.
END_PGML
##############################################################
Context()->functions->disable("All");
Context()->operators->undefine('+','-','**','^','/',' /','/ ','//','U','u+','fn','.','><','!',',','_',' ','*',' *','* ');
Context()->parens->remove('|','(','[','{');
Context()->constants->remove('i');
ENDDOCUMENT();