当前位置:网站首页>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.
边栏推荐
- New York University et al | TM-Vec: Template Modeling Vectors for Rapid Homology Detection and Alignment
- leetcode6132. 使数组中所有元素都等于零(简单,周赛)
- 开源项目站点必备&交流区功能
- Unknown Bounded Array
- By CSDN, torn
- Basic implementation of vector
- 手写二叉查找树及测试
- Lua introductory case of actual combat 1234 custom function and the standard library function
- [cellular automata] based on matlab interface aggregation cellular automata simulation [including Matlab source code 2004]
- 测试
猜你喜欢
[cellular automata] based on matlab interface aggregation cellular automata simulation [including Matlab source code 2004]
预言机简介
HCIP (14)
MYSQL two-phase commit
软件测试周刊(第82期):其实所有纠结做选择的人心里早就有了答案,咨询只是想得到内心所倾向的选择。
Open source project site must-have & communication area function
初出茅庐的小李第114篇博客项目笔记之机智云智能浇花器实战(3)-基础Demo实现
情人节浪漫3D照片墙【附源码】
《少年派2》:新男友竟脚踩两只船,林妙妙与钱三一感情回温
[Search topic] After reading the inevitable BFS solution to the shortest path problem
随机推荐
opencv 缩小放大用哪种插值更好??
更换树莓派内核
IDEA 找不到或无法加载主类 或 Module “*“ must not contain source root “*“ The root already belongs to module “*“
second uncle
Dart named parameter syntax
软考高级系统架构设计师系列之:信息系统基础知识
被 CSDN,伤透了心
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.
Lua introductory case of actual combat 1234 custom function and the standard library function
MySQL修改SQL语句优化性能
When opening a MYSQL table, some can display editing, some do not, how to set.
初出茅庐的小李第113篇博客项目笔记之机智云智能浇花器实战(2)-基础Demo实现
Compiled on unbutu with wiringPi library and run on Raspberry Pi
IDEA调试
Simple vim configuration
One service layer needs to call the other two service layers to obtain data and assemble it into the final data. The data is all lists. How to design the cache?
黑客到底可以厉害到什么程度?
Unknown Bounded Array
MYSQL two-phase commit
How is the tree structure of the device tree reflected?