Making use of python phần 1 ppsx
... to Be Used 11 9 Write the Code 11 9 Execute the Code 12 1 Summary 12 2 Chapter 6 Modules 12 3 Getting Started 12 4 Using Modules 12 4 Modules 12 4 Packages 13 5 Identify the Modules to Be Used 13 6 vi Contents TEAM ... enhancements over Python 1. 5.2. Python 2.0, released in October 2000, was more of a transition from Python 1. 6. Python 2 .1. 1, released in July 20 01,...
Ngày tải lên: 09/08/2014, 16:20
... hexadecimal. Some examples of long integers are these: 53924561L -0x19423L 012 L -47 218 45294529L 0xDEFABCECBDAECBFBAEl 53 513 3629843L -052 418 132735L NOTE Python allows you to use a lowercase L, but ... created. Let’s see how. str1=’know’ >>> str1 ‘know’ >>> id(str1) 16 9 714 88 >>> str1=’treat’ >>> id(str1) 17 043008 Notice that when the string...
Ngày tải lên: 09/08/2014, 16:20
... example, the bitwise and operation between binaries 10 11 and 10 01 will result in 10 01, as shown in the following representation: 10 11 10 01 10 01 Programming Basics 79 TEAM LinG - Live, Informative, ... output of the preceding code will be this: 10 equals 2*5 11 is a prime number 12 equals 2*6 13 is a prime number 14 equals 2*7 15 equals 3*5 16 equals 2*8 17 is a prime...
Ngày tải lên: 09/08/2014, 16:20
Making use of python phần 4 docx
... learn to do the following: ߜ Use file objects ߜ Use standard input and output methods ߜ Use methods of file objects ߜ Use methods of the os module ߜ Use methods of the os.path module Getting ... inside the module, use the following command: >>>fib.fibonacci (10 0) 0 1 1 2 3 5 8 13 21 34 55 89 When a module is imported, the interpreter creates a byte-compiled...
Ngày tải lên: 09/08/2014, 16:20
Making use of python phần 5 doc
... following code returns the directory name of the path ‘/home/user1/file1’: >>> import os >>> os.path.dirname(‘/home/user1/file1’) ‘/home/user1’ The join() Method. The os.path.join() ... from the path /home/user1/file1 by using the following code: >>> import os >>>os.path.basename(‘/home/user1/file1’) ‘file1’ The dirname() Method. You can use the os.pat...
Ngày tải lên: 09/08/2014, 16:20
Making use of python phần 6 docx
... address location bar of the browser. The standard methods of HTTP 1. 1 that are used to specify the type of user request are GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE, and CONNECT. Of these, with ... + ‘,’) SwFile.write(libM [1] + ‘,’) ProductOf=raw_input(‘Enter the name of the software vendor: ‘) SwFile.write(ProductOf + ‘,’) Size=raw_input(‘Enter the size of the software (in...
Ngày tải lên: 09/08/2014, 16:20
Making use of python phần 7 ppt
... command1 command2 commandn Some of the options that you can use with the mysqladmin command are listed in Table 11 .1. Table 11 .2 lists the commands used with the mysqladmin command. Table 11 .1 Options ... option is used to exit silently if a connection to the server cannot be established. -u, —user=[user] This option is used to specify the user for login if not the current user. 2...
Ngày tải lên: 09/08/2014, 16:20
Making use of python phần 8 doc
... time. The output of the code will be this: start at Mon Dec 31 11: 15:03 20 01 4. Recurring is opened at Mon Dec 31 11: 15:06 20 01 2. Current is opened at Mon Dec 31 11: 15:08 20 01 3. Fixed is opened ... 29 16 :39:20 20 01 func2 at Sat Dec 29 16 :39:20 20 01 func2 at Sat Dec 29 16 :39: 21 20 01 func1 at Sat Dec 29 16 :39:22 20 01 func2 at Sat Dec 29 16 :39:22 20 01 func2...
Ngày tải lên: 09/08/2014, 16:20
Making use of python phần 9 ppt
... following output at the Python prompt: URL: http://www .python. org/ content-length = 13 432 keep-alive = timeout =15 , max =10 0 server = Apache /1. 3.20 (Unix) last-modified = Fri, 11 Jan 2002 03:49:53 ... the form of HTTP headers when a client sends a request to the server. Username and password specifications. Cookies can be used to store user iden- tification. Instead of specifyi...
Ngày tải lên: 09/08/2014, 16:20
Making use of python phần 10 docx
... name, 12 7–28 functional attributes, class objects, 16 6–67 functions add(), 10 8 age_func(), 11 9 anonymous, 11 0 12 apply(), 11 2 13 base conversion, 59–60 bee(), 11 0 built-in, 15 , 11 2 18 calling, 10 2–5 class ... instantiation, 16 6 cmp(), 56, 60 colon (:) character, 10 1 course_fee(), 10 4 declaration syntax, 10 1 declaring before calling, 10 9 default arguments, 10...
Ngày tải lên: 09/08/2014, 16:20