1. Comprehensive exercise: Draw one side of the flag, put the code with the run Publish blog to hand in the homework.The code is as follows:1 ImportTurtle2 3 defMygoto (x, y):4 turtle.up ()5 Turtle.goto (x, y)6 Turtle.down ()7 8 defDrow (x):9 Turtle.
JavaScript introduction
1992 Nombas developed the embedded scripting language for C-minus-minus (c--), which was originally bound to Cenvi software, and renamed it Scriptease (the language that the client executes).
Netscape (Netscape)
The Ython Pickle module acts as a persistent storage data.Often encountered in the Python program run to get some strings, lists, dictionaries and other data, want to save for a long time, easy to use later, rather than simply put in memory shutdown
One, operator1. Arithmetic Operation:
operator
Description
Example
+
Add-Two objects added
A+b Output Results 10
-
Minus-one number minus another or a negative number.
Sorting algorithms can be divided into internal and external sorting, the internal sorting is the data records in memory to sort, and the external sort is because of the data is very large, one can not hold all the sort records, in order to access
I made a drum last night. The open () opening file code for Python is as followsdef main ():InFile =open ("C:\Users\Spirit\Desktop\bc.txt", ' R ')data = Infile.read ()Print (data)Main ()Results Total error invaild argument or cant found such file * *
Dict dictionary table belongs to the mapped data typeFeature: Access to data by key (key) instead of subscriptAn unordered collection containing arbitrary objectsVariable length, can be nested arbitrarilybelongs to the "Variable mapping"
First, for the scope of the variable, the execution declaration exists in memory, the variable can be used in the following code (that is, scope)If 2==2:name = ' Tony 'Print NameAre the following conclusions correct?Outer variables, which can be
Image arithmetic Operations1. Image additionUse Cv2.add () to add two images, or you can use NUMPY,RES=IMG1+IMG2 directly. The size of two images, the type must be the same, or the second image can be a simple scalar value.The addition of OPENCV is
Function basicsFunctions: Functions are well-organized, reusable, code snippets used to implement single, or associated functions.Functions can improve the modularity of the application, and the reuse of the code. Python provides a number of
1. base data Type Initial1, number type, int, for calculation, +,-, *,/, add, subtract, multiply, divide. In the python2 there are integral and long integers (3344L), which have not been differentiated in the python3.2, String type, in Python, the
1. View the class properties and methods of the import libraryPython has a bit of a feeling especially inconvenient is that, unlike C + +, when a type is specified, an instance of that type is called "." Intelligently prompts for the method or
The list is ordered and the elements can be modifiedTest = [11, 22, 33, 44, 55, 22]################################## The list of deleted elements ##################################### del test[1] Slice Delete# del Test[1:4] Delete test[1], test[2],
String:The creation of a string:Single quotes, double quotes, triple quotes The particularity of the string:Index tile join repeating member operator (in, not in)Common Methods for strings:1). Determine the type of string (IsDigit, Isspace,
I. Programming and programming languages
The purpose of programming:The invention of the computer is to replace/liberate the human being by machine, and the purpose of programming is to pass the human thought process to the computer
Share a Zip () function usage under Python today.Zip () is an intrinsic function of Python that takes a series of iterated objects as parameters, combining the corresponding elements in the object in order into a tuple, each of which contains
Django path: the next day, the second day of django path
A project has multiple apps. If you want to implement one of the APP functions, what should you do? Next, let's take a look:Step 1: You have created a projectStep 2: You have created an APP in
Django Road: First day, first day of django Road
Create a project
Two methods:
First:
# Create a new project django-admin.py startproject batman # create an APP (first in the project directory) python manage. py startapp bat # create the changed
Count the english words of english article,
# -*- coding: utf-8 -*-import string
def extend_word(text): if text.find('\'') > 0: old2new = dict() words = text.split() for word in words: if word.find('\'') > 0:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service