aboutsummaryrefslogtreecommitdiff
path: root/CST116 Lab 2 Homework.txt
blob: 99f2d989ff65aa5ab8908e087cddbf70ac49122f (plain) (blame)
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
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.)