if branch structure and for cycle knowledge combing on September 16

September 16 I. if Branch Structure 1. Process Control--Three Structures 1) Sequential structure (default) Default sequential structure for program execution Code executes from top to bottom, each code executes only once 2) Branch structure (if) You can choose to execute a section of code (if) depending on whether the ...

Added by 2DaysAway on Fri, 17 Sep 2021 07:30:16 +0300

Object oriented inheritance in python

Object oriented introduction To understand surface objects, we must first understand the concept of objects. In the program, we simplify things into data (i.e. attributes and functions), the state of things is attributes, and the action is functions Taking a cat as an example, the attributes of a cat may include variety, hair color, age, etc. ...

Added by sri_hai1986 on Thu, 16 Sep 2021 04:42:18 +0300

19_python foundation - object oriented - class structure, class attributes and class methods, static methods

target Three characteristics of object orientedClass properties and instance propertiesClass methods and static methods 1, Three characteristics of object oriented encapsulation The operation of writing properties and methods into a class is encapsulationEncapsulation can add private permissions to properties and methods Inheritance ( ...

Added by dardsemail on Sun, 12 Sep 2021 05:39:33 +0300

Learning records_ Module knowledge in Python

Learning records Date: morning of September 7, 2021 modular What is a module: Any file with. py suffix can be called a module What can be included in the module 1. Variable 2. Functions 3. Object oriented (class - > object) 4. Executable code What are the benefits of using modules Convenient management and easy maintenance Reduce comple ...

Added by m4rw3r on Wed, 08 Sep 2021 01:25:49 +0300

PyQt5 GUI receives UDP data and dynamically draws (signaling between multiple threads)

1. Usage of QT   pyqt5 is the python version of qt. It mainly exists in the form of objects. It cannot be visualized in the process of programming, which brings a lot of inconvenience. To simplify pyqt5's interface design, we can use qt Designer (C: \ qt \ 5.12.11 \ mingw73)_ 32 \ bin \ designer. Exe). The generated graphical interfac ...

Added by ricmetal on Wed, 08 Sep 2021 00:55:31 +0300

Python: Basic operations for files

1. Basic Operation of Files def open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True): Format One open file1 = open('demo1.txt','r') operation file1.write('Hello Python !') Close file1.close() Format 2 Open, operate, close within a structure (automatically close when finished) with open ...

Added by zorgon on Thu, 02 Sep 2021 20:00:46 +0300

How to make a picture of 28000 pictures with python (concise and clear with source code)

    preface A picture is made up of numerous pixels, so we will fill these pixels with pictures Knowledge points: 1. cv2 2. numpy 3. tqdm 4. argparse Development environment: Python 3.6 Pycharm Ideas: 1. Input 2. Calculation and processing 3. Output 4. Display Add Penguin Group 695185429 and you can get it for free. All the information is in ...

Added by stewartship on Fri, 22 May 2020 18:17:27 +0300

python serial communication applet (GUI interface)

Serial communication using Python requires the pyserial Library of python, which is not automatically installed when Python is installed and needs to be installed by itself. 1. Install pyserial library: Open the command line window and type: pip install pyserial command on the command line to install. 2. The program uses tkinter, a GUI lib ...

Added by lookee on Tue, 12 May 2020 05:24:47 +0300

WeChat official account data grab

1. grab all the files of a official account. Charles + wechat for computer + pycharm+python   2. Analysis After analysis: every official account list page is connected. At the beginning of https://mp.weixin.qq.com/mp/profile_ext, only a few references to each official account are taken at the time of grasping. Grab:   3. Code impo ...

Added by MNSarahG on Thu, 07 May 2020 18:56:45 +0300

Failed to resolve pycharm add third party package

Today, I want to open the image with pycharm, but an error is reported when I import scipy. The error content is as follows: from scipy.misc import imread Traceback (most recent call last): File "<input>", line 1, in <module> File "D:\pycharm\PyCharm Community Edition 2017.2.3\helpers\pydev\_pydev_bundle\pydev_import_hook ...

Added by adityakonda on Sat, 25 Apr 2020 18:39:46 +0300