diff options
Diffstat (limited to 'CST116 Lab 2 Homework.txt')
| -rw-r--r-- | CST116 Lab 2 Homework.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/CST116 Lab 2 Homework.txt b/CST116 Lab 2 Homework.txt index e69de29..99f2d98 100644 --- a/CST116 Lab 2 Homework.txt +++ b/CST116 Lab 2 Homework.txt @@ -0,0 +1,40 @@ +3a + +4.1 Exercises pg 63-64 +1. Numeric +2. illegal +3. String +4. String +5. Character +6. Numeric +7. illegal + +4.3 (coding problem, submitted on other file.) + +6.1 Exercises pg 122 + +1. invalid, 5x should explicitly read 5*x +2. invalid, 0 should be a variable +3. valid +4. invalid, 0 should be a variable + +3b + +4.12 Exercises pg 82-83 +1. problem: they are multiplying the old wage by .06, which would take .06%, not raise it by .06%. +fix: (@line 3) New_wage = Old_wage * 1.06 + +2. problems: First, the variable Assign_avg is used instead of the previously defined Assignment_avg/ +Second, don't multiply the individual test scores by .15. +Third, Assign_avg (which should be Assignment_avg) should be multiplied by .30 instead of .20 +Lastly, Test_avg should be multiplied by .45, not .40 + +fixes: Test_avg = (Test1 + Test2 + Test3)/3 +Class_score = assignment_avg *.30 + Test_avg * .45 + Final * .25 + +3c + +4.13 + +1. Variables needed: ProductionHours, PreProductionHours, ProducersHours, ProductionCost, PreProductionCost, ProducersCost, TotalCost +2. (coding problem, submitted on other file.)
\ No newline at end of file |