-
Notifications
You must be signed in to change notification settings - Fork 34
/
denard-q1
66 lines (47 loc) · 1.65 KB
/
denard-q1
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
## Complex Power
##ENDDESCRIPTION
##KEYWORDS('Op Amps','operational','amplifier','voltage follower')
## DBsubject('Electrical Engineering')
## DBchapter('Circuit Analysis')
## DBsection('AC Power')
## Date('2018/Jun/03')
## Author('D. Lynch, [email protected]')
## Institution('University of Saskatchewan')
########################################################################
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("Complex");
Context()->flags->set(tolerance => .02);
$R = Real(random(30,90,3));
$L = Real(random(.05,.2,.05);
##############################################################
#
# PGML Area
#
#
BEGIN_PGML
Consider the AC circuit shown below with a 60Hz source of 120 VAC. Given that R is [$R] Ohms and L is [$L/1000] mH, compute the magnitude and the phase abgle of the current (w.r.t. an assumed volage angle of 0 degrees).
[@ image( "sch1.png", width=>400, height=>231) @]*
Current, I = [______] [$I] units.
Phase Angle, Phi = [_______] [$P]
END_PGML
##############################################################
Context()->functions->disable("All");
Context()->operators->undefine('+','-','**','^','/',' /','/ ','//','U','u+','fn','.','><','!',',','_',' ','*',' *','* ');
Context()->parens->remove('|','(','[','{');
Context()->constants->remove('i');
ENDDOCUMENT();