0802e81d41547b0b38baae41a3f352b53e161411
foreignthon-es
Spanish language pack for ForeignThon — write Python in Español.
Install
pip install foreignthon foreignthon-es
Example
fizzbuzz.es.py
def fizzbuzz(n):
para i en dist(1, n + 1):
si i % 15 == 0:
imprimir("FizzBuzz")
osi i % 3 == 0:
imprimir("Fizz")
osi i % 5 == 0:
imprimir("Buzz")
sino:
imprimir(i)
fizzbuzz(20)
Compiles to standard Python:
def fizzbuzz(n):
for i in range(1, n + 1):
if i % 15 == 0:
print("FizzBuzz")
elif i % 3 == 0:
print("Fizz")
elif i % 5 == 0:
print("Buzz")
else:
print(i)
fizzbuzz(20)
Run it directly:
fpy run fizzbuzz.es.py
Keyword reference
| Python | Español |
|---|---|
if |
si |
else |
sino |
elif |
osi |
for |
para |
while |
mientras |
def |
def |
class |
clase |
return |
retornar |
import |
importar |
True |
Verda |
False |
Falso |
None |
Nada |
print |
imprimir |
input |
entrada |
len |
lon |
range |
dist |
Full mapping: src/foreignthon_es/es.json
Start a project
fpy new myproject --lang es
cd myproject
fpy run src/main.es.py
Documentation
Contributing
Found a missing translation or a better keyword choice? Open an issue or PR — no access to the core repo needed.
License
GPL v3