What Symbols are Basically Used in Programming?

plabs.id
PLABS.ID
4 min readOct 13, 2021

--

To build command in programming certainly can not be separated from the “symbol”. Symbols in computer programming are primitive data types whose instances have a unique human-readable form. In programming we use to called symbol as “operator”. These symbols can be used as identifiers that have a specific purpose for each character. There are several symbols used, but these are the basic symbols that used in programming:

1. Brackets or Parentheses ()

Parentheses have a special purpose. This is frequently used to control the order of operations in an expression and to supply pr enclose parameters to a function or method.

Example use of brackets in Python Code

2. Curly Braces or Braces {}

Braces are use to group statements and declarations and major part of the C and C++ programming language. In statements, the braces comes in a if statement, a loop (while, for, and do/while), functions, conditional statements, or switch statements. An opening brace { must always be followed by a closing brace }. This braces referred to a condition that being balanced. If it unbalanced (ex: just an open brace ‘{‘), so it can lead to impenetrable compiler errors that are sometimes difficult to track down in large programs. Because of their variety of uses, braces are also very important to the syntax of a program. Moving braces one or two lines away will usually dramatically affect the meaning of a program.

Example use of dictionary in Python Code

3. Square Brackets []

Square brackets are used to define the use of an array or we can say to index elements in an array and also strings. In array, indexes start at zero 0, so that element one 1 of an array is array [0] and [9] is an element of 10.

Example use of square brackets in Python Code

4. Semicolon ;

This symbol lets the compiler know that it has reached the end of a command or statement. If in a sentence of a story, this would be like a dot, to simply end the line of code.

Example use of semicolon in Python Code

5. Equals =

This is used to assigning values to a variable and it is different with ‘==’.

Example use of equals in Python Code

6. Is Equal to… ==

This is used to checks whether the values of two operands are equal or not, if yes (they are same) then the condition becomes true.

E.g., a == 10 is not true (not same)

Example use of is equal in Python Code

7. Is Not Equal to.. !=

This is used to check wether the values of two operan are equal or not, if the values are not equal then the condition becomes true.

Example use of is not equal to in Python Code

8. Single Quotes ‘ ’ and Double Quotes “ ”

These two has same use, both used to indicates that you are writing characters directly into the code. You can use any of them based on your preference. But the main drawback of a single quote (‘ ‘) is not supported by JSON.

Example use of single quotes and double quotes in Python Code

9. Mathematical Symbols +-*/%

These are symbols used to perform arithmetic operations.

+ for addition (adds two opperans)

- for subtraction (subtracts second operand)

* for multiplication (multiplies both operands)

/ for division (divides numerator by de-numerator)

% for modulus (this gives remainder of an interger division)

Example use of mathematical symbols in Python Code

Understanding the basic symbols in programming means you are one step closer to becoming a programmer. We will frequently come across these symbols for use in programming. Therefore, make sure you understand it. If you don’t understand, you can ask in the comments!

To acquire knowledge, one must study. But to acquire wisdom, one must observe. — Marilyn vos Savant

--

--

plabs.id
PLABS.ID

PLABS.ID is a technology company based in Indonesia since 2019, we're on a mission to simplify digitalization at every touchpoint.