当前位置:网站首页>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.
边栏推荐
- Simple and easy to use task queue - beanstalkd
- IDEA无法识别module(module右下角没有蓝色小方块)
- 初出茅庐的小李第112篇博客项目笔记之机智云智能浇花器实战(1)-基础Demo实现
- 785. 快速排序
- Unity3D study notes 10 - texture array
- Basic implementation of vector
- "Youth Pie 2": The new boyfriend stepped on two boats, and the relationship between Lin Miaomiao and Qian Sanyi warmed up
- 移动端页面秒开优化总结
- [SemiDrive source code analysis] series article link summary (full)
- win10 fixed local IP
猜你喜欢
随机推荐
[Search topic] After reading the inevitable BFS solution to the shortest path problem
[Message Notification] How about using the official account template message?
New York University et al | TM-Vec: Template Modeling Vectors for Rapid Homology Detection and Alignment
2. # 代码注释
Unknown Bounded Array
The maximum quantity leetcode6133. Grouping (medium)
软件测试面试(三)
How is the tree structure of the device tree reflected?
一个service层需要调用另两个service层获取数据,并组装成最后的数据,数据都是list,缓存如何设计?
Basic Theoretical Knowledge of Software Testing - Use Cases
纽约大学等 | TM-Vec:用于快速同源检测和比对的模版建模向量
Basic implementation of vector
second uncle
软考高级系统架构设计师系列之:系统开发基础知识
TypeScript简化运行之ts-node
[cellular automata] based on matlab interface aggregation cellular automata simulation [including Matlab source code 2004]
在打开MYSQL表时,有的可以显示编辑,有的没有,如何设置。
【SemiDrive源码分析】系列文章链接汇总(全)
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.
The kernel of the decompression process steps









