Which verb to use with “The variable [verb] a value”?

Consider the mathematical expression x=5. What would be the correct sentence?

  1. The variable x is the value 5.
  2. The variable x has the value 5.
  3. The variable x takes the value 5.

[Slightly related to this question.]


All three terms are used but they are used in different contexts.

For example if you are talking about a variable which is defined as a constant or is an initial condition whose value is determined by the environment before the discussion starts we would say something like “C has the value 10”

If on the other hand we were talking about a set of different scenarios we are likely to say things like “When we double the input voltage then A (the amperage passing through R) takes the value 20”

However when we are talking about the relationship between an input variable and the resultant value we often say things like “If y = 2x then if x if is 4 then y is 8”.

There is no definitive answer to your question as the correct (or perhaps the most commonly used) verb changes with the context.

Source : Link , Question Author : Karlo , Answer Author : BoldBen

Leave a Comment