Cerca
Heus ací els resultats de la cerca.
Noms de pàgina coincidents:
Resultats de text complet:
- Modulo 2 (intermedio): Cadenas @info:cursos:netacad:python:pe2m2
- ASCII (por sus siglas en inglés American Standard Code for Information Interchange). El Código Estándar ... ivados del código de páginas son ambiguos. == Unicode Las páginas de códigos ayudaron a la industria in... que resolvió el problema a largo plazo fue el Unicode. **Unicode asigna caracteres únicos (letras, guiones, ideogramas, etc.) a más de un millón de puntos d
- Módulo 3 - Valores booleanos, ejecución condicional, bucles, listas y su procesamiento, operaciones lógicas y de bit a bit @info:cursos:netacad:python
- no es igual * ''>'',''<'',''>='',''<='' == if <code python>if <exp>: linea1 linea2 elif <ex... linea5 linea6 else: linea3 linea4</code><code python>if number1 > number2: larger_number = number1 else: larger_number = number2</code> * no mezclar tabs y espacios en blanco en
- 3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
- 8 is a document that provides coding conventions (code style guide) for Python code. PEP 8 is considered one of the most important PEPs and a must-read for e... sional Python programmer, as it helps to make the code more consistent, more readable, and more efficien... about one simple but important observation:** our code will be read much more often than it will be writ
- Curso python udemy @info:cursos:udemy
- creación de ejecutables == jupyter notebook * <code bash>sudo apt install libsqlite3-dev</code> * <code bash>pip3 install jupyter notebook</code> * <code bash>jupyter notebook</code> == Cheatsheet: Data Ty
- Modulo 1 (intermedio): Módulos @info:cursos:netacad:python:pe2m1
- strucción para importar de la siguiente manera: <code python>import math</code> La cláusula contiene: * La palabra reservada import. * El **nombre del ... ues de la palabra reservada import, por ejemplo: <code python> import math import sys </code> o enumerando los módulos después de la palabra clave reservada i
- Módulo 2 (Intermedio): Excepciones @info:cursos:netacad:python:pe2m2
- ): Excepciones == Errores, fallas y otras plagas <code>Cualquier cosa que pueda salir mal, saldrá mal.</code> Esta es la ley de Murphy, y funciona en todo y ... ejecución del código puede salir mal, lo hará. <code python>import math x = float(input("Ingresa x: "... rint("La raíz cuadrada de", x, "es igual a", y) </code> Hay al menos dos formas posibles de que "salga m
- Modulo 4: Funciones @info:cursos:netacad:python:pe1m4
- o se ve la definición más simple de una función: <code python> def function_name(): function_body </code> * Siempre comienza con la palabra reservada d... se definirá la función. Se llamará **message**: <code bash>def message(): print("Ingresa un valor: ")</code> Se ha modificado el código, se ha insertado la
- Módulo 4 (Intermedio): Biblioteca datetime @info:cursos:netacad:python:pe2m4:biblioteca
- r la fecha local actual usando el método today. <code python> from datetime import date today = date.t... t("Mes:", today.month) print("Día:", today.day) </code> El método //today// devuelve un objeto del tipo... arámetros año, mes y día de la siguiente manera: <code python> from datetime import date my_date = date(2019, 11, 4) print(my_date) </code> Al crear un objeto date, toma en cuenta las sig
- Módulo 3: Programación Orientada a Objetos - Herencia @info:cursos:netacad:python:pe2m3
- tarse a si mismo**. Comencemos con un ejemplo. <code python> class Star: def __init__(self, name, ... xy sun = Star("Sol", "Vía Láctea") print(sun) </code> El programa imprime solo una línea de texto, que en nuestro caso es: <code><__main__.Star object at 0x7f1074cc7c50></code> Si ejecutas el mismo código en tu computadora, verás a
- 1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
- your cars.json is located and launch the server: <code bash>json-server --watch cars.json</code> **Note (very important)** – the fact that the ''json-server'' serves the data initially encoded as JSON has absolutely nothing to do with the fa... ll transmit JSON messages between the client (our code) and the server (''json-server''). The way the se
- 4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
- regulations!) associated with documenting Python code using docstrings. In short, it tries to answer th... tion about the functionality of a larger piece of code in a **prescriptive** way. They help programmers... urpose, operation, and capabilities of particular code blocks or sections. == Docstring vs. comments Bef... ggest): comments are used for **commenting** your code, while docstrings are used for **documenting** yo
- Módulo 4 (Intermedio): Generadores @info:cursos:netacad:python:pe2m4
- s antes. Echa un vistazo al fragmento de código: <code python> for i in range(5): print(i) </code> La función ''range()'' es un generador, la cual tambié... ador. El código produce el siguiente resultado: <code> __init__ __iter__ __next__ 1 __next__ 1 __next__... 13 __next__ 21 __next__ 34 __next__ 55 __next__ </code> Observa: * El objeto iterador se instancia pr
- 1.1 SQLite @info:cursos:pue:python-pcpp1:m5
- lite3 module, you must import it in your script: <code python>import sqlite3</code> NOTE: The sqlite3 module has been available in Python since version 2.5. ... ect'' method provided by the ''sqlite3'' module: <code python>import sqlite3 conn = sqlite3.connect('hello.db')</code> The ''connect'' method returns the database rep
- playbooks @info:cursos:udemy:ansible
- * configuraciones y variables * formato YAML:<code yaml; playbook.yml>--- - name: Mi primer playbook... st=/etc/host - name: ... service: ... </code> * cada guión es un playbook, puede haber var... en 2 grupos a la vez * se puede usar **!** <code yaml> hosts: serweb # un grupo, afecta a todas la... s hosts: serweb:dbweb # afecta a los dos grupos </code> <code bash> # usamos el inventario del directori
- 1.4 Talking to JSON in Python @info:cursos:pue:python-pcpp1:m4
- and we're sure that you knew it before we asked: <code python> import json </code> The first JSON module's power is the ability to automatically **convert Py... utputs a number – we don't expect anything more: <code python> import json electron = 1.602176620898E10−19 print(json.dumps(electron)) </code> The code outputs: <code ; output> 16021766189.98
- Módulo 3 (Intermedio): Programación Orientada a Objetos - Un viaje por la OOP @info:cursos:netacad:python:pe2m3
- Módulo 3 (Intermedio): Programación Orientada a Objetos - Excepciones @info:cursos:netacad:python:pe2m3
- Modulo 3 (intermedio): Los conceptos básicos del enfoque orientado a objetos @info:cursos:netacad:python:pe2m3