Question:
a. productCost = 100
b. productPrice = productCost
c. productPrice = productName
d. productPrice = “24.95”
e. 15.67 = productCost
f. productCost = $1,345.52
g. product Cost = productPrice − 10
h. productName = “mouse pad”
i. productCost + 20 = productPrice
j. productName = 3-inch nails
k. productName = 43
l. productName = “44”
m. “99” = productName
Response:
(a) valid
(b) valid
(c) invalid
(d) valid
(e) invalid
(f) invalid
(g) invalid
(h) valid
(i) invalid
(j) invalid
(k) invalid
(l) valid
(m) invalid
Details:
(a) valid. The variable productCost can accept the numerical value of 100.
(b) valid. Since both productCost and productPrice are numerical, one can be assigned to the other.
(c) invalid. As productName is a string, it cannot be assigned to a numeric variable like productPrice.
(d) valid. The variable productPrice allows for the assignment of the number 24.95.
(e) invalid. 15.67 is not a valid variable and cannot be assigned.
(f) invalid. The symbols $ and, cannot be used in numeric variable assignments like productCost.
(g) invalid. The term should be written as productCost without the space.
(h) valid.