Tuesday, August 9, 2011

Chapter 3, exercise 2

2.  Determine appropriate variable names for these values:


a.  A person's age to the nearest year.

age

b.  A person's weight in pounds.

weight

c.  The radius of a circle.

radius

d.  Your annual salary.

salary

e.  The cost of an item.

price

f.  The highest grade on a test (assume it is always 100).

grade

g.  The temperature.

temperature

h.  A person's net worth.

net_worth

i.  The distance to a star in miles.

distance

No comments:

Post a Comment