But some of the websites/people explain these two in... - 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

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

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

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

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

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:

Objective vs subjective issues

There are many issues one can debate. In some of those debates, the correct answer is objective and in other issues, it's subjective. Or put another way, some issues are factual and others issues are non-factual.

When the issue being debated is fact...

Not giving up on symmetry

The idea of symmetry proved very powerful. Giving it up would mean giving up on naturalness - the idea that the universe has to be exactly the way it is for a reason.

But inside black holes, the speed of light (which grounded Einstein's work) will not play a vital role in the future....

Sticking to a healthy lifestyle

Sticking to a healthy lifestyle

Staying in shape is mostly about program compliance.

It’s not about having the best fitness program, but about having one that’s good enough, eating less junk food and making sure you actually stick to it. 

And most people have trouble doing that.

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