25 tips for an engineer interview

  • 2020-07-21 08:38:05
  • OfStack

25 points for an engineer interview

1. What exactly is Python? You can compare your answers to other techniques

Here are 1 of the key points:

Python is an interpreted language. This means that, unlike the C language and its derivatives, Python code does not need to be compiled before it is run. Other interpreted languages include PHP and Ruby.

Python is a dynamically typed language. It means that you do not need to specify the type of a variable when you declare it. You can write code like x=111 and x="I 'm a string" without error.

Python is well suited for object-oriented programming (OOP) because it supports defining classes (class) by combining (composition) with inheritance (inheritance).

There are no access specifiers in Python (access specifier, like public and private in C++), which are designed to say "everyone is an adult".

In the Python language, functions are class 1 objects (ES43en-ES44en objects). This means that they can be assigned to variables, and that functions can either return function types or accept functions as input. Class (class) is also a class 1 object.

Python code is fast to write, but generally slower than compiled languages. The good news is that Python allows for extensions based on the C language, so we can optimize the code and eliminate bottlenecks, which are usually achievable.

A good example is Numpy, which is really fast because a lot of arithmetic isn't actually done through Python.

Python has a wide range of applications -- networking applications, automation, scientific modeling, big data applications, and so on. It is also often used as a "glue language" to help other languages and components improve their health.

Python makes the hard stuff easy, so programmers can focus on designing algorithms and data structures without dealing with the low-level details.
If you're applying for an Python development position, you should know what language it is and why it's so cool. And what's wrong with it.

2. What is PEP8?

PEP8 is a programming specification with advice on how to make your programs more readable.
Its main content includes code choreography, document choreography, the use of whitespace, comments, document description, naming conventions, coding recommendations and so on.

3. What are pickling and unpickling?

The Pickle module reads in any Python object, converts it to a string, and then dumps it to a file using the dump function -- a process called pickling.
Instead, the process of extracting the original Python object from the stored string file is called unpickling.

4. How is Python explained?

Python is an interpreted language, its source code can run directly. The Python interpreter converts source code into an intermediate language, which is then translated into machine code for execution.

5. How does Python manage memory?

Memory management for Python is managed by the private heap space. All Python objects and data structures are in one private heap. The programmer does not have access to the heap, and only the interpreter can operate on it.

The heap memory allocation for Python is done by the Python memory management module, and the core API will provide 1 method to access this module for programmers.
Python has its own garbage collection system, which collects and frees unused memory so that it can be used by other programs.

6. What tools are available to help debug or do static analysis?

PyChecker is a static analysis tool that reports not only errors in the source code, but also error types and complexity. Pylint is another tool for verifying that a module meets code standards.

7. What is the Python decorator?

The Python decorator is a unique change in Python that makes it easier to modify functions.

8. What's the difference between arrays and tuples?

The difference between arrays and tuples: array content can be modified, while tuple content is read-only. In addition, tuples can be hashed, for example, as dictionary keywords.

9. How is parameter passing by value and reference passing implemented?

All 1-cuts in Python are classes, and all variables are references to an object. The referenced value is determined by the function and therefore cannot be changed. But if an object can be modified, you can change the object.

10. What are dictionary and list derivations?

They are syntactic structures that make it easy to create dictionaries and lists.

11. What are the built-in data structures of Python?

Python's built-in data structures are mutable and immutable. Mutable ones are: arrays, collections, dictionaries; Immutable are: strings, tuples, Numbers.

12. What is the Python namespace?

In Python, all names exist in a space where they exist and are manipulated -- this is the namespace.
It's like a box with one object for every variable name. When a variable is queried, the corresponding object is found in the box.

13. What is lambda in Python?

This is an anonymous function that is often used for a single expression in code.

14. Why doesn't lambda have a statement?

The reason the anonymous function lambda has no statement is that it is used to build a new function object and return it when the code is executed.

15. What is pass in Python?

Pass is a statement that will not be executed in Python. In complex statements, if a place needs to be temporarily whitened, it is often used as a placeholder.

16. What is a traversal in Python?

A traversal is used to traverse through a container such as a list of 1 set of elements.

What is unittest in Python?

In Python, unittest is the unit testing framework in Python. It has capabilities to support Shared scaffolding, automated testing, pause code during testing, iterate different tests into groups, and more.

18. What is slicing in Python?

Slicing is a syntax for selecting 1 paragraph in an ordered object type (array, tuple, string).

19. What is a constructor in Python?

Generators are a mechanism for implementing iterators. Its implementation relies on the yield expression, except that it is just a normal function.

20. What is docstring in Python?

The document string in Python is called docstring, and its role in Python is to generate documentation for functions, modules, and class annotations.

21. How do I copy an object in Python?

If you want to copy an object in Python, most of the time you can use copy.copy () or copy.deepcopy (). But not all objects can be copied.

22. What is the negative index in Python?

The sequence index in Python can be either positive or negative. If it is a positive index, 0 is the first index in the sequence and 1 is the second index. If it's negative, (-1) is the last index and (-2) is the next-to-last index.

23. How do I convert a number to a string?

You can use the built-in function str() to convert a number to a string. If you want to use base 8 or base 106, use oct() or hex().

24. What is the difference between Xrange and range?

Xrange is used to return 1 xrange object and range is used to return 1 array. Regardless of the range, Xrange USES the same memory.

What are the modules and packages in Python?

In Python, modules are one way to build programs. Each Python code file is a module and can refer to other modules, such as objects and properties.
A folder containing a lot of Python code is a package. A package can contain modules and subfolders.

Then I recommend python to you:

Python is not a compromise

Python should be on your list


Related articles: