当前位置:网站首页>What is a programming language
What is a programming language
2022-08-01 03:39:00 【JIeJaitt】
In fact, a program refers to a series of instructions that tell a computer what to do, and the key to writing a program is that we need to provide these instructions in a language that the computer can understand.
Although with the help of technologies such as Siri (Apple), Google Now (Android, Cortana (Microsoft), etc., we can directly tell the computer what to do in Chinese, such as "Siri, open Kugou Music", readers who have used these systems haveKnowing that it is not yet fully mature, and our language is full of ambiguities and imprecisions, designing a computer program that fully understands human language remains an open problem.
In order to effectively avoid all the factors that affect the transmission of instructions to the computer, computer scientists have designed some symbols. These symbols have their own meanings, and there is no ambiguity between them. They are usually called programming languages.Every construct in a programming language has a fixed usage format (called syntax) and a precise meaning (called semantics).In other words, programming languages specify sets of rules for writing instructions that computers can understand.Traditionally, we call these individual instructions computer code, and the process of writing an algorithm in a programming language is called coding.
Python is a programming language that this tutorial will cover, but you must have heard of other programming languages such as C, C++, Java, Ruby, etc.To date, computer scientists have developed hundreds of programming languages, and over time, these programming languages have produced many different versions.But no matter which programming language it is, or how many versions there are, although they may differ in details, there is no doubt that they all have a fixed, unambiguous syntax and semantics.
The programming languages mentioned above are all high-level computer languages, designed to facilitate the understanding and use of programmers.But strictly speaking, computer hardware can only understand a very low-level programming language called machine language.
For example, let the computer do the sum operation of 2 numbers, then the CPU may execute the following instructions:
- Load the number located in the memory space at 2001 into the CPU;
- The number located in the memory space at 2002 is also loaded into the CPU;
- In the CPU, do the sum operation on these 2 numbers;
- Store the result in memory space at location 2003.
As you can see, summing 2 numbers requires a lot of work, and this is only a general description, it will be more complicated in practice.
With a high-level language such as Python, the sum of 2 numbers can be expressed naturally by c = a + b, but the problem caused by this is that we need to design a method to translate the high-level language intoThere are two ways to implement machine language that can be executed by a computer, using a compiler and an interpreter.
A high-level language that uses a compiler to convert itself into machine language equivalently is usually called a compiled language; and a high-level language that uses an interpreter to convert itself into machine language is called an interpreted language, and Python is interpreted programminga kind of language.
The meaning and difference between compiled language and interpreted language will be introduced in detail when there is an opportunity.
边栏推荐
猜你喜欢

每周小结(*67):为什么不敢发表观点

Software Testing Weekly (Issue 82): In fact, all those who are entangled in making choices already have the answer in their hearts, and consultation is just to get the choice that they prefer.

<JDBC> 批量插入 的四种实现方式:你真的get到了吗?

New York University et al | TM-Vec: Template Modeling Vectors for Rapid Homology Detection and Alignment

软件测试周刊(第82期):其实所有纠结做选择的人心里早就有了答案,咨询只是想得到内心所倾向的选择。

Talking about hardware device computing storage and data interaction

让你的 Lottie 支持文字区域内自动换行

Unity3D study notes 10 - texture array

Ordinary users cannot access HGFS directory

【uniCloud】云对象的应用与提升
随机推荐
树莓派 的 arm 版的 gcc 安装 和环境变量的配置
【uniCloud】云对象的应用与提升
Chinese version of Pylint inspection rules
Basic implementation of vector
Nmap manuals - the full version
Weekly Summary (*67): Why not dare to express an opinion
【分层强化学习】HIRO:Data-Efficient Hierarchical Reinforcement Learning
初出茅庐的小李第114篇博客项目笔记之机智云智能浇花器实战(3)-基础Demo实现
软件测试周刊(第82期):其实所有纠结做选择的人心里早就有了答案,咨询只是想得到内心所倾向的选择。
开源项目站点必备&交流区功能
MYSQL master-slave replication
After specifying set 'execution.savepoint.path', restart flinksql and report this error
ARM cross compilation
[Data analysis] Based on matlab GUI student achievement management system [including Matlab source code 1981]
Introduction to Oracle
纽约大学等 | TM-Vec:用于快速同源检测和比对的模版建模向量
测试
Simple vim configuration
opencv 缩小放大用哪种插值更好??
Flutter “Hello world“ 程代码