First of all, we need to understand the usage... - Deepstash
Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Machine Learning With Google

Discover 95 similar ideas in

It takes just

14 mins to read

First of all, we need to understand the usage of both variables and constants. Variables are used to store values which can be changed in run time whereas constant cannot be changed.

{1/9}

8

20 reads

MORE IDEAS ON THIS

<p>Values stored in memory can...

Values stored in memory can't be accessed without knowing the address. Since we can't remember addresses, we need some kind of label which points to that address. Something like a contact number saved in the phone. We can’t remember phone numbers, but we can remember names.

{8/9}

8

13 reads

So, both "Variable" and "Constant" come under a concept called "Identifiers". As the name suggests, identifiers help us to identify a value which is stored in the memory with the help of a name. It's like a box which contains some values/information with a label attached.

{4/9}

8

11 reads

Also Also identifiers can be function names, type names, class names, labels, etc.,can be function names, type names, class names, labels, etc.,

{9/9}

8

18 reads

But some of the websites/people explain these two in the wrong way. Mostly the definition for constant would be "A constant is a variable that can't be changed in the program".

{2/9}

8

24 reads

It totally makes no sense. This statement states that a CONSTANT is a VARIABLE but it's value can't be changed. If CONSTANT is a VARIABLE then the value can be changed. A total collapse in the meaning.

{3/9}

8

12 reads

Say if you wanna store a number "42" in your program/code, you can assign it to an identifier. So that you can use it later in your program.

{5/9}

8

11 reads

If a value stored in an identifier which can be changed in the run time, it is called a "Variable". If it cannot be changed it is called a "Constant".

{6/9}

8

11 reads

Variables vs Constants

Variables vs Constants

Variables and Constants are mostly misunderstood in programming. Most of the time, most of the people read bad definitions on Constants. A thread on this.

8

83 reads

CURATED FROM

IDEAS CURATED BY

djhemath

A self-taught software developer, obsessed with product ideas. I love to sleep, travel, make music and meeting people in person.

Related collections

Other curated ideas on this topic:

Managing your mindset

There are two types of mindset: fixed and growth.

The first one can be met at individuals who believe that both success and failure are based mainly on innate abilities, which cannot be changed throughout one's lifetime, while the second mindset describes ...

Some vs. Any

We were taught, from the very first years of studying English, that 'any' and 'some' can be used in similar sentences. However, conversation analysts have come to the conclusion that 'any' usually meets with resistance, whereas 'some' will lead to a better response. This might be because 'any' is...

Five Skills That Are Permanent

  • Dealing with uncertainties, insecurities and changes, rising above the stuff we cannot control and focusing on what we can.
  • Spending or investing time wisely, as time is infinitely more valuable than money, but is wasted.
  • The abili...

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates