当前位置:网站首页>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.
边栏推荐
- The IDEA can't find or unable to load The main class or Module "*" must not contain The source root "*" The root already belongs to The Module "*"
- MYSQL logical architecture
- 初出茅庐的小李第113篇博客项目笔记之机智云智能浇花器实战(2)-基础Demo实现
- HIRO: Hierarchical Reinforcement Learning 】 【 Data - Efficient Hierarchical Reinforcement Learning
- Input input box cursor automatically jumps to the last bug after the previous input
- 【 Make YOLO Great Again 】 YOLOv1 v7 full range with large parsing (Neck)
- Raspberry pie arm version of GCC installed configuration and environment variables
- MYSQL Index Analysis
- 使用ts-node报错
- [Message Notification] How about using the official account template message?
猜你喜欢

leetcode6133. 分组的最大数量(中等)

Which interpolation is better for opencv to zoom in and out??

对无限debugger的一种处理方式

初出茅庐的小李第113篇博客项目笔记之机智云智能浇花器实战(2)-基础Demo实现

【消息通知】用公众号模板消息怎么样?

Hackers can how bad to what degree?

Introduction to the Elastic Stack

解决IDEA默认情况下新建文件时,右击,new,没有XML文件的问题

Flink deploys and submits jobs

HIRO: Hierarchical Reinforcement Learning 】 【 Data - Efficient Hierarchical Reinforcement Learning
随机推荐
解决IDEA默认情况下新建文件时,右击,new,没有XML文件的问题
MySQL修改SQL语句优化性能
带你体验一次类型编程实践
《少年派2》:新男友竟脚踩两只船,林妙妙与钱三一感情回温
每周小结(*67):为什么不敢发表观点
pdb drug comprehensive database
ARM cross compilation
How to download the Keil package
IDEA modifies the annotation font
初出茅庐的小李第112篇博客项目笔记之机智云智能浇花器实战(1)-基础Demo实现
Unknown Bounded Array
测试
Replacing the Raspberry Pi Kernel
Software Testing Interview (3)
Summary of JVM interview questions (continuously updated)
Ordinary users cannot access HGFS directory
【Make YOLO Great Again】YOLOv1-v7全系列大解析(Neck篇)
情人节浪漫3D照片墙【附源码】
预言机简介
使用ts-node报错