Ir al contenido principal

E.1. Applicability and Definitions

This License applies to any manual or other work that contains a notice placed
by the copyright holder saying it can be distributed under the terms of this Li-
cense. The \Document," below, refers to any such manual or work. Any member
of the public is a licensee, and is addressed as \you."
A \Modi¯ed Version" of the Document means any work containing the Docu-
ment or a portion of it, either copied verbatim, or with modi¯cations and/or
translated into another language.
A \Secondary Section" is a named appendix or a front-matter section of the
Document that deals exclusively with the relationship of the publishers or aut-
hors of the Document to the Document's overall subject (or to related matters)
and contains nothing that could fall directly within that overall subject. (For
example, if the Document is in part a textbook of mathematics, a Secondary
Section may not explain any mathematics.) The relationship could be a matter
of historical connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical, or political position regarding them.
The \Invariant Sections" are certain Secondary Sections whose titles are de-
signated, as being those of Invariant Sections, in the notice that says that the
Document is released under this License.
The \Cover Texts" are certain short passages of text that are listed, as Front-
Cover Texts or Back-Cover Texts, in the notice that says that the Document is
released under this License.
A \Transparent" copy of the Document means a machine-readable copy, repre-
sented in a format whose speci¯cation is available to the general public, whose
contents can be viewed and edited directly and straightforwardly with generic
text editors or (for images composed of pixels) generic paint programs or (for
drawings) some widely available drawing editor, and that is suitable for input to
text formatters or for automatic translation to a variety of formats suitable for
input to text formatters. A copy made in an otherwise Transparent ¯le format
whose markup has been designed to thwart or discourage subsequent modi¯ca-
tion by readers is not Transparent. A copy that is not \Transparent" is called
\Opaque."

 

Examples of suitable formats for Transparent copies include plain ASCII wit-
hout markup, Texinfo input format, LATEX input format, SGML or XML using
a publicly available DTD, and standard-conforming simple HTML designed for
human modi¯cation. Opaque formats include PostScript, PDF, proprietary for-
mats that can be read and edited only by proprietary word processors, SGML
or XML for which the DTD and/or processing tools are not generally availa-
ble, and the machine-generated HTML produced by some word processors for
output purposes only.
The \Title Page" means, for a printed book, the title page itself, plus such
following pages as are needed to hold, legibly, the material this License requires
to appear in the title page. For works in formats which do not have any title
page as such, \Title Page" means the text near the most prominent appearance
of the work's title, preceding the beginning of the body of the text.

Comentarios

Entradas populares de este blog

C.3. Cartas, mazos y juegos Python

1: import random 2: class Carta: 3: listaDePalos = [ "Tr¶eboles" , "Diamantes" , "Corazones" , 4: "Picas" ] 5: listaDeValores = [ "nada" , "As" , "2" , "3" , "4" , "5" , "6" , "7" , 6: "8" , "9" , "10" , "Sota" , "Reina" , "Rey" ] 7: 8: def __init__(self, palo=0, valor=0): 9: self.palo = palo 10: self.valor = valor 11: def __str__(self): 12: return (self.listaDeValores[self.valor] + " de " +\ 13: self.listaDePalos[self.palo]) 14: def __cmp__(self, otro): 15: # controlar el palo 16: if self.palo > otro.palo: return 1 17: if self.palo < otro.palo: return -1 18: # si son del mismo palo, controlar el valor 19...

6.4. Tablas de dos dimensiones

Una tabla de dos dimensiones es una tabla en la que Usted elige una fila y una columna y lee el valor de la intersección. Un buen ejemplo es una tabla de multiplicar. Supongamos que desea imprimir una tabla de multiplicar para los valores del 1 al 6. Una buena manera de comenzar es escribir un bucle sencillo que imprima los múltiplos de 2, todos en una l³nea. 1: i = 1 2: while i <= 6: 3: print 2*i, '\t' , 4: i = i + 1 5: print La primera línea inicializa una variable lllamada i , que actuara como contador, o variable de bucle. Conforme se ejecuta el bucle, el valor de i se incrementa de 1 a 6. Cuando i vale 7, el bucle termina. Cada vez que se atraviesa el bucle, imprimimos el valor 2*i seguido por tres espacios. De nuevo, la coma de la sentencia print suprime el salto de línea. Despues de completar el bucle, la segunda sentencia print crea una línea nueva. La salida de este programa es: 2 4 6 8 10 12 Hasta ahora, bie...

1.3.1. Errores sintácticos

Python solo puede ejecutar un programa si el programa es correcto sintácticamente. En caso contrario, es decir si el programa no es correcto sintácticamente, el proceso falla y devuelve un mensaje de error. El término sintaxis se refiere a la estructura de cualquier programa y a las reglas de esa estructura. Por ejemplo, en español la primera letra de toda oración debe ser mayúscula, y todas las oraciones deben terminar con un punto. esta oración tiene un error sintáctico. Esta oración también para la mayoría de lectores, unos pocos errores sintácticos no son significativos, y por eso pueden leer la poesía de e. e. cummings sin anunciar errores de sintaxis. Python no es tan permisivo. Si hay aunque sea un solo error sintáctico en el programa, Python mostrará un mensaje de error y abortará la ejecución del programa. Durante las primeras semanas de su carrera como programador pasará, seguramente, mucho tiempo buscando errores sintácticos. Sin embargo, tal como adquiera experiencia tendr...