Rangos…

--Originally published at Mike's Blog

Los rangos son una rapida manera de imprimir números deseados. Estos son entre los valores que le pusimos.  Estos rangos son utilizados en los ciclos for, para poder dar los parametros del ciclo.  El comando es de esta manera:

  • for var in range(num inicial, num final, saltos)

Python el primer parametro es el número con el que empieza, el segundo es el número con el que termina, y trecero es cuanto va a saltar.

Por ejemplo:

zettayotta1

Aqui queremos hacer una lista que vaya guardando los valor del contador.  En este caso el número inicial es 1 y va contando de dos en dos hasta que llega a 29. Recordemos que Python tomaría como número inicial al 1 y como final al 29. El número final escrito no se incluye, solo se incluyen valores menores que este. De aqui sale que tomaría hasta el 29.

El resultado de este programa es una lista.

holshols

MAS INFO AQUI

 

http://pythoncentral.io/pythons-range-function-explained/


Zen of Python

--Originally published at Python

2zen

I’ve been looking more into the Zen of Python and what it actually says. First I disregarded it because I knew most of the things it talks about, but the I thought “What about people who are just starting?” Of course they won’t know how to guide themselves through the world of programming. So I decided to talk about the points that I believe are the most important in the Zen of Python.

The first one being “simple is better than complex”. It is important to understand this point because there are times when people try to do a super complex programs when in reality, it can be simplified into something everyone can understand. Making something complex will only bring you trouble in the future. If something goes wrong, then you will have to go through your complex program, understand the problem, why it is there, and then come up with a solution. Keeping things simple makes your life way easier.

Next is “Readability counts”. It is important that your code is readable. This point is similar to the last one, but a little more general. You want your code to be readable so that you can understand it, as well as others. If it is hard to understand, then you won’t be able to figure out your problem as easy as you could if it was. Also, if you ever show this code to others, they will be just as confused as you because they won’t understand anything.

Finally, I just want to talk about the point stating “Now is better than never.” Everyone that is starting to program has to take this one into account. Leaving everything for later won’t help you at all. If you want to be good at programming, you need to start

Continue reading "Zen of Python"

Monty Python and the Zen of Coding

--Originally published at Monty Python and the Blogging Tale

I think I get it, but I do not get it.

It’s kind of funny how someone could actually come up with this.

“Zen of Python”

Tim Peters must be a genius, Monty Python level:

I mean, coming up with a philosophy for a coding language is just pure gold.

Link for the Zen: https://www.python.org/dev/peps/pep-0020/

This Zen just summarizes the simplicity and utility of python.


Zen of Python… (Un lenguage diferente)

--Originally published at Mike's Blog

“Zen of Python”, los veinte principios del conocido lenguage. Pero ¿A qué se refiere esto? La respuesta es simple, estos veinte principios describen como debería de ser la escritura del lenguage.

Screenshot from 2016-08-25 12-36-27

No explicaré que significa cada uno de los principios, pero si diré lo que pienso acerca de esto. Basicamente estos principios son las “reglas” de python. La razón es (que aunque se escuche cliché) python es un lenguage de programación diferente a los demas, ya que a parte de su simplicidad, es extremadamente flexible, y es comodo de usar.

Lo que me encanta de python es su filosofía, que como se puede leer en el “Zen of Python” esta gira alrededor de la legibilidad. Para que un código en python este bien hecho se debería de poder interpretar la mayor parte del código sin ejecutarlo. Parte de la legibilidad, es hacer más con menos, esto significa usar las menos lineas de programación posibles.

Muchas personas catalogan este lenguage como muy facil, y en parte tienen razón, pero no por ser facil, significa que no es útil. Este es un lenguage extremadamente capaz de solucionar problemas.

e5e5d17a95704d39421f34f44f867460bf75528f20e5773b6850888be3b8dd75

Este es el segundo lenguage de programación que aprendo, y me encanta como es tan fácil de leer e interpretar. Creo que este lenguage es perfecto para gente que quiere aprender a programar.

 

SDKLSDKVSDKN

 

 


ZEN OF PYTHON

--Originally published at angelmendozas

You can get this by typing on your mac terminal “python3” enter and then type “import this”.

The Zen of Python, by Tim Peters:

Beautiful is better than ugly.

Explicit is better than implicit.

Simple is better than complex.

Complex is better than complicated.

Flat is better than nested.

Sparse is better than dense.

Readability counts.

Special cases aren’t special enough to break the rules.

Although practicality beats purity.

Errors should never pass silently.

Unless explicitly silenced.

In the face of ambiguity, refuse the temptation to guess.

There should be one– and preferably only one –obvious way to do it.

Although that way may not be obvious at first unless you’re Dutch.

Now is better than never.

Although never is often better than *right* now.

If the implementation is hard to explain, it’s a bad idea.

If the implementation is easy to explain, it may be a good idea.

Namespaces are one honking great idea — let’s do more of those!