Variables in Math vs Programming

TheDevStory
2 min readApr 8, 2024

--

Variables are like labels we use both in math and programming, but they have different jobs in each field.

Math

  • What They Are: Like nametags for unknown or any numbers we want to talk about.
  • Their Job: Help us explore how numbers relate to each other and solve puzzles with numbers.
  • Why We Use Them: To think about number problems in a big-picture way, making it easier to understand patterns and solve equations.

Programming

  • What They Are: Like boxes in a computer’s memory where we can keep and change information as our program runs.
  • Their Job: Hold onto information so we can do things with it, like calculations or making decisions.
  • Why We Use Them: To get stuff done in our programs, like organizing information, making choices, or repeating tasks efficiently.
Variable In Programing 1
Variable In Programing 2

The Big Picture

For programmers, it’s really helpful to get how these different kinds of variables work. Math variables are all about thinking broadly and finding patterns, while programming variables are about holding and working with information in a hands-on way. Even though they do different things, at heart, they’re both about working with information — whether that’s solving a math problem or telling a computer what to do. Understanding this can make us better at thinking through problems and coming up with solutions, no matter if we’re working with numbers or coding

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

TheDevStory
TheDevStory

Written by TheDevStory

A web developer crafting online experiences. Also football(soccer) coach and Spanish Learner.

No responses yet

Write a response