Published Sep 4, 2021
3 mins read
516 words
This blog has been marked as read.
Double Click to read more
Technology

Think Like A Pro(grammer) Part3.the Simplest Of Concepts();

Published Sep 4, 2021
3 mins read
516 words

Hey people, welcome to the third part of Think Like a Programmer and thank you for reading my previous ones. Well, don't worry, it's not gonna be boring.

Now that you have understood the simplicity of programming, I am now telling you about the most basic concepts of programming that will definetly make sense even if you are not interested in programming at all(maybe😅).

The few things that are common to most Programming languages are-

1.Data Types.

Well, most probably, you know most of the data types and also what they mean. The most common Data Types are String, Integer, Float, Double, Character, Variable etc.

float - floating point numbers like 2.4, 5.18 etc

double - floating point number with more decimal places like 2.4000, 5.182862, 2.1972 etc.

It is necessary to define the data type for the compiler to be able to work with them. And declare something with the wrong data type, your compiler gets angry.

1.Operators.

Operators are means of working with data types. These are used as signs with the variables which tell the compiler what to do with them. Just like we use ‘+’ sign between two integers to tell the compiler that you want to add them up. Well, in programming there are various categories of operators too-

(i) Arithematic Operators.

And you know what they mean too.

+ for addition, - for subtraction, * for miltiplication, / for division, %(modulus) for remainder, ++ for increment, –– for decrement etc. 

(ii) Assignment Operators

Well, they are nothing much but a shorter way of assigning values than we would normally do.

If you want to add 5 to a variable x, what would you do? You could simply write ‘x = x + 5’ couldn't you? But what if there is shorter way of doing the same? That's what assignment operators do. So instead of writing ‘x = x + 5’, you can write ‘x += 5’ and that will do the same. And in the same way there are -

(iii) Relational Operators

These are operators which are used to relate two or more variable and return either true or false according to the condition. So, ‘5 > 2’ is true because 5 is greater than 2 and ‘8 == 0’ is false because 8 is not equal to 0.

(iv) Logical Operators

Logical operators are logical operators. Just kidding, these are used to make the compiler use logic between two conditions. For example ‘&&’ is used as ‘AND’ for two conditions. The compiler checks whether both the conditions are true or not, so ‘True && True’ is True because both are true and ‘True && False’ is False because one of them is false While || (OR) operator will return true if any of the conditions is true.

Hmm… looks like those were all of the simplest of the concepts and in that case I will have to end the blog here and don't worry I will be back with more interesting concepts of programming. Thank you for reading till the last.

And, TO BE CONTINUED…

Follow me

for a follow back.

9
5
2k_queen 9/4/21, 11:28 AM
Good one
faiz.shaikh 9/4/21, 2:11 PM
👍👍
_pooja_01 9/4/21, 3:20 PM
Nice one monkhood visit my blogs too 🙌
m.cube 9/4/21, 3:30 PM
Well written🙂 keep going. Check mine too. Follow for a definite follow back.
asadmirza1997 9/4/21, 8:51 PM
Nice blog

Candlemonk | Earn By Blogging | The Bloggers Social Network | Gamified Blogging Platform

Candlemonk is a reward-driven, gamified writing and blogging platform. Blog your ideas, thoughts, knowledge and stories. Candlemonk takes your words to a bigger audience around the globe, builds a follower base for you and aids in getting the recognition and appreciation you deserve. Monetize your words and earn from your passion to write.