web123456

Python vs. other languages like Java, PHP, C, C#, C++, etc.?

‘’’
language, which has the characteristics of both high-level language and assembly language, it is structured language.C language applies pointers: it can directly carry out operations close to the hardware, but the pointer operations of C are not protected, which also brings a lot of insecurity to it.C++ has improved in this aspect, which retains the pointer operations and enhances the security, which is supported by some users, but due to the fact that These improvements increased the complexity of the language and were criticized by another part of the community. java, on the other hand, learned the lessons of C++, eliminated pointer operations and some of the controversial aspects of C++'s improvements, and achieved good results in terms of security and suitability, but its own interpretation runs in a virtual machine and is less efficient to run than C++/C. Generally speaking, C, C++, and java are considered to be languages of the languages of the same family, and they have long occupied the top three places in program usage lists.
Advantages of the C language: concise and compact, flexible and convenient; rich in operators; rich in data types; flexible and practical expression; allows direct access to physical addresses and manipulation of hardware; high quality of the generated object code, high efficiency of program execution; good portability; expressive power;
Disadvantages of C: The disadvantages of C are mainly in the encapsulation of data, which makes C very defective in data security, which is also a major difference between C and C++. The syntax of C is not too strict, the type constraints on variables are not strict, which affects the safety of the program, and there is no check for array subscript out of bounds, and so on. From an application standpoint, C is more difficult to master than other high-level languages. That is to say, for those who use C language, it is required to be a little more proficient in program design.

++ is the successor to C. It allows for both procedural programming in C, object-based programming featuring abstract data types, and object-oriented programming featuring inheritance and polymorphism.C++ excels at object-oriented programming while also allowing for procedural-based programming, and thus C++ varies in size by the size of the problem it adapts to. C++ is good at object-oriented programming and can also do procedural programming.
C++ not only possesses the practical features of efficient computer operation, but also works to improve the programming quality of large-scale programs and the problem description capability of the programming language.
Programs in C++ are compiled because they have to reflect high performance. However, the development environment, in order to facilitate testing, the debugging environment is made interpreted. That is, during the development process, debugging is carried out in the form of interpreting statement-by-statement execution, and the final execution code of the program is generated in the form of starting and running the program out of the development environment in the form of compiling.
Generating a program is the process of converting source code (C++ statements) into a runnable application. If the program is written correctly, then the process is usually taken care of by simply pressing a function key. The process is actually split into two steps.
The first step is to compile the program, which requires a compiler. The compiler converts C++ statements into machine code (also known as object code); if this step is successful, the next step is to link the program, which requires a linker. The linker merges the compiled machine code with the code in a C++ library, which contains functions ("functions" is another name for subroutines) that perform certain common tasks. For example, a C++ library contains the standard square root function, sqrt, so you don't have to calculate the square root yourself.C++ libraries also contain subroutines that send data to the monitor and know how to read and write data files on the hard disk.

  1. C#, C# is an object-oriented, high-level programming language released by Microsoft that runs on top of the .NET Framework.C# looks strikingly similar to Java; it includes things like single inheritance, interfaces, almost the same syntax as Java, and the process of compiling to intermediate code and then running it. But C# is distinctly different from Java in that it borrows from theDelphiOne of the features of C# is that it is directly integrated with COM (Component Object Model) and it is the main protagonist of the .NET windows web framework from Microsoft. First of all, C#, like JAVA, literally copies parts of the syntax of C++, and therefore, for the large number ofC++ programIt is easy for the staff to learn, and in addition, it is simpler than C++ for the novice. Secondly, Windows is a monopolized platform, and to develop Windows applications, of course, Microsoft's voice cannot be ignored. Most importantly, compared to C++, developing application software in C# can greatly shorten the development cycle, and at the same time, it can utilize the original C++ code except the user interface code.

  2. Java is an object-oriented programming language for writing cross-platform applications, and is the collective name for the Java programming language and the Java platforms (i.e., JavaSE, JavaEE, JavaME) introduced by Sun Microsystems in May 1995. Java technology is characterized by its exceptional versatility, efficiency, platform portability, and security. Java technology has excellent versatility, efficiency, platform portability, and security, and is widely used in personal PCs, data centers, game consoles, scientific supercomputers, cell phones, and the Internet, as well as having the world's largest professional community of developers. In the global cloud computing and mobile Internet industry environment, Java has significant advantages and broad prospects.
    The advantage of Java, unlike traditional programs, is that Sun launched Java as an open technology. Tens of thousands of Java developers around the world are required to design Java software that is compatible with each other. "The Java language is the power of the group, not the company" is one of Sun's slogans, and is recognized by a wide range of software developers. This is in contrast to the elitist and closed model advocated by Microsoft, which explains the Java programming language as simple, object-oriented, distributed, interpreted, robust, secure and system-agnostic, portable, high-performance, multithreaded, and dynamic.

language, PHP (abbreviation of PHP: Hypertext Preprocessor, Chinese name: "PHP: Hypertext Preprocessor") is a general-purpose open source scripting language. The syntax absorbs the characteristics of C, Java and Perl, the threshold for entry is low, easy to learn, widely used, mainly for the field of Web development.
Features: PHP's unique syntax is a mixture of C, Java, Perl and PHP's own new syntax; PHP can execute dynamic web pages faster than CGI or Perl - dynamic pages, compared to other programming languages, PHP is embedded in HTML documents to execute the program, the execution efficiency is much higher than fully generated htmL markup CGI. efficiency is much higher than that of CGI, which completely generates htmL tags; PHP has very powerful functions, all the functions of CGI can be realized by PHP; PHP supports almost all popular databases and operating systems; the most important thing is that PHP can be used in C, C++ for the expansion of the program.

language, an object-oriented, straightforward computer programming language, Python has a concise and clear syntax with a rich and powerful class library. Often nicknamed the glue language, it makes it easy to easily link together various modules made in other languages (especially C/C++). A common application scenario is to use python to quickly generate a prototype of a program (and sometimes even the final interface of the program), and then rewrite the parts of it that have special requirements in a more appropriate language.
Python is a completely object-oriented language. Functions, modules, numbers, and strings are all objects. And it fully supports inheritance, overloading, derivation, and multiple inheritance, which is useful for enhancing reusability of source code.Python supports overloaded operators and dynamic typing. Compared to Lisp, a traditional functional programming language, Python provides only limited support for functional design. There are two standard libraries (functools, itertools) that provide the tried-and-true functional programming tools of Haskell and Standard ML.Python itself is designed to be extensible. Not all features and functionality are integrated into the core of the language, and Python provides a rich set of APIs and tools so that programmers can easily write extension modules in C, C++, or Cython.The Python compiler itself can be integrated into other programs that require a scripting language. For this reason, many people also use Python as a "glue language". Python is used to integrate and encapsulate programs written in other languages.
‘’’
2. Briefly describe interpreted and compiled programming languages?
Copy
‘’’

  • Compiled (requires a compiler, equivalent to Google Translate): compiled language execution speed, does not depend on the language environment to run, poor cross-platform, such as C, C++ execution speed, debugging trouble

  • Interpretation (requires an interpreter, equivalent to simultaneous interpretation): Interpretation cross-platform good, a code, used everywhere, the disadvantage is that the execution speed is slow, dependent on the interpreter to run, such as python, JAVA execution speed is slow, debugging convenience
    ‘’’
    3、Python interpreter types and features?
    Copy
    ‘’’

CPython

CPython is the most widely used and used Python interpreter. This tutorial is based on CPython. After downloading and installing Python 2.7 from the official Python website, we get an official version of the interpreter: CPython, which is developed in C, hence the name. running python from the command line starts the CPython interpreter.

IPython

IPython is an interactive interpreter based on top of CPython, that is to say, IPython is only enhanced in the way of interaction, but the function of executing Python code is exactly the same as CPython. It's like many domestic browsers have different appearance, but the kernel actually calls IE. CPython uses >>> as the prompt, while IPython uses In [serial number]: as the prompt.

PyPy

PyPy is another Python interpreter that targets execution speed.PyPy uses JIT technology to dynamically compile (not interpret, mind you) Python code, so it can dramatically improve the execution speed of Python code.

The vast majority of Python code can be run under PyPy, but there are some differences between PyPy and CPython, which leads to the fact that the same Python code may have different results when executed under the two interpreters. If your code is going to be put under PyPy for execution, you need to understand the differences between PyPy and CPython.

Jython

Jython is running on the Java platform Python interpreter , you can directly compile Python code into Java bytecode execution .

IronPython

IronPython is similar to Jython, except that IronPython is a Python interpreter that runs on the Microsoft .Net platform and can compile Python code directly into .
‘’’
4 Relationship between bits and bytes?
Copy
‘’’
8 bit = 1bytes
‘’’
5. What is the relationship between b, B, KB, MB and GB?
Copy
‘’’
8bit = 1B
1024B = 1KB
1024KB = 1MB
1024MB = 1GB
‘’’

Need Java Interview Questions?
Here I would like to say, because I also took a lot of detours over, so I was determined to organize, the collection process is not easy, but the thought of helping to part of the self-study java people, the heart is also sweet! The need for partners please point ㊦ square] ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓