Physics 1xx Laboratories - WebAssign

Units on WebAssign

Many numerical-entry questions require units to be entered after the number. Some aspects of this can be confusing.

When do I enter units?

Units are required any time the answer is a quantity that has units (like velocity or angle) AND the units are not shown next to the answer box. If the units are shown, you must make sure that your submission is correct using those units. If the units are not shown, you need to enter the units following your number.

How do I enter units?

Type one space between the number and the units, and then enter the units in the correct format. For example, a velocity would be entered as "1.2 m/s", not "1.2m/s".

Will my submission be marked wrong if I enter the wrong units?

It depends.

If you have entered the wrong type of units, such as meters (or m) when the answer requires velocity (m/s), then you will see an error message indicating that the wrong type of units have been entered. This means you have a chance to fix the units and try again, if you have a submission left.

But, if you have entered meters (m) when your number is actually correct in centimeters (cm), then no units-related error message will appear. The unit type is considered correct (a unit of length), but the wrong number will result in the submission being marked wrong.

Finally, if you have made an error in the units that WebAssign does not recognize, you will see a "syntax error" type of message. In this case, WebAssign is not able to read your submission, so it cannot tell if the answer is correct or not. Thus, the submission will not be recorded or marked. If this error is left, then ultimately zero points will be awarded.

What is the correct format for entering units?

Webassign will accept a wide variety of unit formats. For example, for acceleration, you may enter "m/s^2", "m/s2", "m/(s*s)", "m/s/s", "meter/second^2", "meter/second*second", and various other equivalent arrangements. Note: the unit labels in a compound unit are treated like variables in an algebraic expression, but the only "operators" that would be recognized are multiplication: either a star ("*") or a space (" "), division: a forward slash ("/") and raising to a power: a caret ("^").

Note: in texts you may see a compound unit written with a dash, for example, the units of momentum might be written as "kg-m/s". This type of format will not work in WebAssign. Webassign will try to interpret the dash as a minus sign, and give an error.

WebAssign will also correctly convert units that reduce to the same type. For example, "1 N" = "1 kg*m/s^2", and if this were the correct answer, both forms would be recognized. One could even enter acceleration as a "N/kg" (newton per kilogram).

The unit conversion aspect is quite deep. All kinds of equivalent units could be entered. For example, one could calculate acceleration in "inches/fortnight^2", and as long as the number in these units was correct, the answer would be accepted.

Don't forget the space between the number and the unit.

Degrees or Radians?

Strictly speaking, radians are unitless, since they are defined as the ratio of the arc lenth of a subtended angle to the radius of the circle that the arc lies on. However, in WebAssign, angular quantities need to have the units specified. You would use "rad" or "radians" as the unit for such questions.

You may also use degrees, "deg" or "degrees". Again, a degree is not a unit in the usual sense, it is just 1/360th of the way around a circle. But you must specify that your answer is in degrees by giving the "unit" of degrees.

How does the units checking system work?

When you enter your submission, WebAssign breaks it into two chunks, the number part and the units part. The units are sent to a common Unix function called units() that does all the work. If the units are recognized, this function returns a unit conversion factor that is used to multiply your number by, and then the result is checked against the question "key" (the optimally correct value). If your units are the same as the key's units the conversion factor is "1". But if, for example, your units were "cm" and the key's units were "m", then the conversion factor would be "0.01", since, e.g., (23.5 cm)*(0.01 m/cm)=0.235 m.