Skip to content

Commit 6c6f60b

Browse files
authored
Update module8-4a.pg
Fixed sig figs
1 parent aaa5ed2 commit 6c6f60b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

ProblemLibrary/setCH151_LearningChecks/module8-4a.pg

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,12 @@ $j = 3;
5252
Context("InexactValue");
5353

5454
$massAl = InexactValue(26.98, 4);
55-
$massSe = InexactValue(78.97, 4);
55+
$massSe= InexactValue(78.97, 4);
56+
$massSeSF = InexactValue(78.97, 5);
5657

5758

58-
$subtotalAl = $massAl*$i;
59-
$subtotalSe = 0;
60-
while ($j > 0) {
61-
$subtotalSe = $subtotalSe + $massSe;
62-
$j = $j-1;
63-
}
64-
59+
$subtotalAl = InexactValue($massAl*$i, 4);
60+
$subtotalSe = InexactValue($massSeSF*$j, 5);
6561

6662

6763
$total = $subtotalAl + $subtotalSe;
@@ -143,3 +139,4 @@ END_PGML_SOLUTION
143139
############################################################
144140

145141
ENDDOCUMENT();
142+

0 commit comments

Comments
 (0)