3

I'm not quite sure of the formal difference between a variable and a parameter. The way I explain a parameter is that while its input value differs from case to case, the concept is always the same. Examples include B for base, h for height, etc. A variable is a symbol whose value and the concept it stands for both differ from problem to problem/case to case. For example, x has both different values and different things it represents. Is this correct, or am I missing something?

Nate
  • 147
  • 1
    You are mostly correct in your understanding. a parameter is a constant that is used to describe the behavior of a function or equation, and its value remains constant. a variable is a symbol that represents a value that changes as the input to a function or equation changes.

    For example, is the equation $y=mx+b$, where $m$ and $b$ are parameters and $x$ is a variable, the slope $m$ and the y-intercept $b$ are fixed values that determine the the line. the value of the line at any point $x$ changes depending on the value of $x$.

    – knight5478 Feb 04 '23 at 08:19
  • 1
    I addressed your query in this answer and in the links within it. – ryang Feb 04 '23 at 12:49
  • knight5478 - thanks! I'm assuming it works the same way for computer science? – Nate Feb 05 '23 at 05:27

0 Answers0