Skip to content

Commit 8984749

Browse files
committed
Initial commit
0 parents  commit 8984749

30 files changed

Lines changed: 2537 additions & 0 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__pycache__/
2+
.vscode/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Ezequiel Leonardo Castaño
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Python Para Programadores

chapter0/chapter0.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Introducción - Entorno y Sugerencias
2+
3+
## Instalar Python
4+
5+
### Versión de Python
6+
7+
![versiones de Python](python_versions.png)
8+
9+
Source: https://devguide.python.org/#status-of-python-branches
10+
11+
Versiones anteriores: https://devguide.python.org/devcycle/#end-of-life-branches
12+
13+
## Software a Instalar
14+
15+
- Instalar Anaconda: https://www.anaconda.com/products/individual
16+
17+
- Instalar una fuente con ligatures (recomendada Fira Code): https://github.com/tonsky/FiraCode/wiki/Installing
18+
19+
- Instalar Visual Studio Code (VS Code): https://code.visualstudio.com/
20+
21+
- Elegir un Tema cómodo a los ojos (recomendado Monokai Pro y Gruvbox Dark)
22+
23+
![VS Code Temas](vscode_themes.png)
24+
25+
26+
### Extensiones Recomendadas para VS Code:
27+
28+
- Python (aprox 25.2M Descargas)
29+
30+
- vscode-icons (6.1M Descargas)
31+
32+
- Code Runner (aprox 4.9M Descargas)
33+
34+
- Python-autopep8 (206K Descargas)
35+
36+
- Pyright (51K Descargas)
37+
38+
- Polacode-2020 (25K Descargas)
39+
40+
Theme Recomendado (Personal): **Monokai Pro** o **Gruvbox**
41+
42+
## Configuración Custom de VS Code (settings.json):
43+
44+
- Usar CMD en lugar de Powershell:
45+
46+
"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\cmd.exe"
47+
48+
- Reglas para guia
49+
50+
"editor.rulers": [79, 120]
51+
52+
- Habilitar ligaduras (Sólo con Fira Code o similar)
53+
54+
"editor.fontLigatures": true
55+
56+
57+
## Capítulos
58+
59+
### 1. Tipos de datos primitivos y operadores.
60+
### 2. Variables y Colecciones
61+
### 3. Control de Flujo
62+
### 4. Funciones
63+
### 5. Classes
64+
### 6. Módulos y estructura de imports
65+
### 7. Aspectos avanzados del lenguaje
66+
### 8. Recursos adicionales
67+
### 9. Apéndices
68+
69+
70+
## Fuente
71+
72+
Tutorial adaptado de https://learnxinyminutes.com/docs/es-es/python-es/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {
8+
"workbench.colorTheme": "Gruvbox Minor Dark Hard"
9+
}
10+
}

chapter0/gruvbox/theme_test.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
una_variable = 100
2+
3+
hex(10)
4+
int("0xa", 16)
5+
6+
def dividir(x, y): # Comentario
7+
return x / y
8+
9+
10+
if una_variable % 2 == 0:
11+
print("El valor es par")
12+
elif una_variable < 0:
13+
print("El valor es impar y negativo")
14+
elif una_variable > 100:
15+
print("El valor es impar y mayor a 100")
16+
else:
17+
print("El valor no cumple las condiciones")
18+
19+
nombres = ["Juan", "Pedro", "Maria"]
20+
edades = [60, 15, 84]
21+
for nombre, edad in zip(nombres, edades):
22+
print(f"{nombre} tiene {edad} años")
23+
24+
class Rectangulo:
25+
def __init__(self, base: float, altura: float) -> None:
26+
self.base: float = base
27+
self.altura: float = altura
28+
29+
def area(self) -> float:
30+
return self.base * self.altura
31+
32+
rec = Rectangulo(10, 10)
33+
rec.base
34+
rec.area()

chapter0/monokai_pro/theme_test.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
una_variable = 100
2+
3+
hex(10)
4+
int("0xa", 16)
5+
6+
def dividir(x, y): # Comentario
7+
return x / y
8+
9+
10+
if una_variable % 2 == 0:
11+
print("El valor es par")
12+
elif una_variable < 0:
13+
print("El valor es impar y negativo")
14+
elif una_variable > 100:
15+
print("El valor es impar y mayor a 100")
16+
else:
17+
print("El valor no cumple las condiciones")
18+
19+
nombres = ["Juan", "Pedro", "Maria"]
20+
edades = [60, 15, 84]
21+
for nombre, edad in zip(nombres, edades):
22+
print(f"{nombre} tiene {edad} años")
23+
24+
class Rectangulo:
25+
def __init__(self, base: float, altura: float) -> None:
26+
self.base: float = base
27+
self.altura: float = altura
28+
29+
def area(self) -> float:
30+
return self.base * self.altura
31+
32+
rec = Rectangulo(10, 10)
33+
rec.base
34+
rec.area()

chapter0/python_versions.png

28.2 KB
Loading

chapter0/theme_test.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
una_variable = 100
2+
3+
hex(10)
4+
int("0xa", 16)
5+
6+
def dividir(x, y): # Comentario
7+
return x / y
8+
9+
10+
if una_variable % 2 == 0:
11+
print("El valor es par")
12+
elif una_variable < 0:
13+
print("El valor es impar y negativo")
14+
elif una_variable > 100:
15+
print("El valor es impar y mayor a 100")
16+
else:
17+
print("El valor no cumple las condiciones")
18+
19+
nombres = ["Juan", "Pedro", "Maria"]
20+
edades = [60, 15, 84]
21+
for nombre, edad in zip(nombres, edades): # Zip combina listas
22+
print(f"{nombre} tiene {edad} años")
23+
24+
class Rectangulo:
25+
def __init__(self, base: float, altura: float) -> None:
26+
self.base: float = base
27+
self.altura: float = altura
28+
29+
def area(self) -> float:
30+
return self.base * self.altura
31+
32+
rec = Rectangulo(10, 10)
33+
rec.base
34+
rec.area()

chapter0/vscode_themes.png

235 KB
Loading

0 commit comments

Comments
 (0)