1.1 Title picture
1.2 Title Document
using namespace std;
//Define a type def that will be very useful when we implement our functions.
typedef char* charPointer;
//This type def will make cstring parameter passing by reference easy to debug
//Example void foo(charPointer& x) ...
Posted by powerpants on Sat, 05 Mar 2022 01:48:14 +0100
(1) When storing multiple data of the same type, you can use array, which is a reference type.
Two ways to create arrays
//The first creation method Use the new keyword
var nameList = new Array();
//The second creation method uses  literal.
var nameList = ;
(2) Data is stored by index (sequence number) in the number, and t ...
Lecture 21 functional programming
Procedural and object-oriented programming belong to the imperative programming paradigm
"How to do" needs to be described in detail, including operation steps and state changes. They are consistent with von Neumann architecture. They are widely used programming paradigms a ...
When writing automation use-case code, I always write a lot of functions and have a confusing understanding of their parameters. Here's a simple summary and summary of how functions are used
def Function name(Formal parameter 1,Formal parameter 2,...):
#If it is necessary to return a result to the caller, it ...
Posted by zack45668 on Thu, 03 Feb 2022 19:51:19 +0100
For a given tuple (1, 2, 3, 4, 5, 6, 7, 8, 9, 10), write a program to print the first half value in one line and the last half value in one line.
Method 1: use the loop to output the tuple data
tpl = (1,2,3,4,5,6,7,8,9,10)
for i in range(0,5):
print(tpl[i],end= ' ')
for i in range(5,10):
Posted by michalchojno on Thu, 03 Feb 2022 00:16:21 +0100
Can the following pattern successfully match L of type int list? If the match is not successful, indicate the type of the pattern? (assuming x is of type int)
(x::y)::L failed, cannot int::int
[x, y] successful
x::L means to append x to the list L_ Wildcards can represent any t ...
Posted by Dirtbagz89 on Fri, 07 Jan 2022 06:46:13 +0100
What is a function
Function refers to "taking" a name for a piece of code that implements a specific function, and then executing (calling) the function through the name A function can accept zero or more arguments, or return zero or more values
Functions need to be clarified
1. The function needs several key data that need to ...
Posted by Cesar on Wed, 05 Jan 2022 14:23:48 +0100
Functions and modules in Python
Functions are packages of code that are relatively independent and reusable.
1. Modules and functions in the standard library
functionexplainabsReturns the absolute value of a number. For example, abs(-1.3) will return 1.3.binConvert an integer to a binary string starting with '0b'. For example, bin(123) will ...
Posted by matthewlesh on Mon, 03 Jan 2022 03:53:54 +0100
In the previous study, if we need to calculate the factorial of three numbers, we need to write repeated code three times to calculate, which is very troublesome. World class programming master
Mr. Martin Fowler once said:“
Code has many bad smells, and repetition is the worst! ". To write high-quality code, the first thing to so ...
Posted by Yesideez on Wed, 29 Dec 2021 12:10:35 +0100
In 2020, the sales of double 11 reached a new high, of which tmall's sales exceeded 490 billion yuan and JD's sales exceeded 270 billion yuan. At the same time, the rapid development of live e-commerce contributed a lot to the rapid growth of e-commerce sales during the double 11.
In recent years, the double 11 e-commerce shoppi ...
Posted by username123 on Sun, 26 Dec 2021 05:55:03 +0100