Ad Code

Responsive Advertisement

Commands Over Syntax In Computers Language

Commands Over Syntax In Computers Language






 In computer programming, commands and syntax are both important aspects of a programming language. Syntax refers to the structure and rules of the language that govern how code is written and interpreted. Commands, on the other hand, are specific instructions that are used to perform actions within a program.

Both syntax and commands are necessary for writing effective code. Syntax provides the framework for organizing and communicating ideas, while commands allow the programmer to manipulate data, control program flow, and interact with the system.

For example, in the Python programming language, the syntax for defining a function is:

a=input("message to be printed ")
print(a)
#we can also check the type of data given
b=type(a)
print(b)

Here a is the variable name and print function is used to display the output, and type function is used to check the data type, # is used to add comment in a single line.

In summary, both syntax and commands are essential components of a programming language, and they work together to enable programmers to write effective and functional code.


Post a Comment

0 Comments

Close Menu