day11 summary and assignment

summary I Define function What is a function concept A function is the encapsulation of the code that implements a specific function - > a function corresponds to a function (the function stored in the function) Classification (by who created the function) System functions - there are functions that have been created in Python l ...

Posted by nocniagenti on Tue, 01 Mar 2022 09:22:31 +0100

How to simplify a lot of if... elif... else code?

In daily code, we always face a lot of problems of if... elif... else conditional branch selection. To tell you the truth, the first thing I recommend in most cases is to write honestly if... elif, and try to extract the content under each branch into independent functions. Clear structure and clear intention are great convenience for writing a ...

Posted by Amit Rathi on Tue, 01 Mar 2022 04:49:16 +0100

Using Python to make a beautiful girl word cloud dance video

Recently, many children are learning Python and want to find a fun hand training project. Let's share a simple Python project for beginners today. This article will take blibli – ride the wind and waves video as an example, you get to download the video. At the same time, python is used to climb the video barrage of station B, opencv i ...

Posted by patrick99e99 on Tue, 01 Mar 2022 03:50:27 +0100

New Python object-oriented ~ ~ ~ learning record

catalogue 1, Class definition and creation: -Simple creation: -Class properties: 2, Instance object -Instance object method: class name () -Instance object method:_  init _ _ method 3, Method -Example method -Static method -Class method 4, Class inheritance -Succession: -Method overrides in inheritance -Reference parent ...

Posted by TexasMd91 on Tue, 01 Mar 2022 00:59:07 +0100

Python thread 19 procrastination patient Timer class

Official Python column Article 56, students stop, don't miss this article starting from 0! Multithreading has been written for nearly 20 articles. This article is a little easier. Let's learn about the Timer class. This class is very simple, but very special. Every new year, we will summarize and repeat ourselves with the previous flag. T ...

Posted by jbog91 on Mon, 28 Feb 2022 22:04:54 +0100

Online Chat--Introduction and Realization of WebSocket

Before HTML5, browsers and servers communicated through the HTTP protocol, so what's the use of introducing a WebSocket? Imagine a web page broadcasting a score of a football match live in text. Without a WebSocket, the client, or browser, usually updates the score dynamically in two ways: AJAX and long polling. What is the difference between ...

Posted by phwae on Mon, 28 Feb 2022 18:41:14 +0100

python learning -- object oriented (elementary)

class There are many kinds of life, human, birds, animals and so on. These classes have properties and capabilities that they all share. Then we can use classes to define a human, in which an instantiated variable of human is called an object. 1. Role of class Similar to a function combining a piece of code, a class can combine variables ...

Posted by Xyphon on Mon, 28 Feb 2022 14:50:43 +0100

Python function foundation

Function basis 1. Define function 1. What is a function concept A function is the encapsulation of the code that implements a specific function - > a function corresponds to a function (the function stored in the function) Classification (by who created the function) System functions - there are functions that have been created in Py ...

Posted by manmanman on Mon, 28 Feb 2022 13:42:29 +0100

day11 summary and assignment

summary I Define function What is a function concept A function is the encapsulation of the code that implements a specific function - > a function corresponds to a function (the function stored in the function) Classification (by who created the function) System functions - there are functions that have been created in Python l ...

Posted by playa4real on Mon, 28 Feb 2022 13:38:35 +0100

11 summary and operation (function related part)

1, Summary Function basis Sentiment: a function is a code encapsulation that implements a specific function Classification: #. the functions are classified according to who created them: system functions (such as print, type, etc.) and user-defined functions (self created) Syntax: Def function name (formal parameter list): - def: keywor ...

Posted by bogdaniel on Mon, 28 Feb 2022 12:59:13 +0100