--Originally published at Programming Blog
Prepare for trouble and make it double!
Topics
- Zen of Python
- Use of loops with while
- Importing and using modules/libraries
- Use of conditional “if”
- Use of conditional “else” (and elif)
This blog is made by Juan Montero and Daniel Arrieta #TC101
Zen of python
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!
First of all what is zen of python, it is recognized as how coding in python should be, since we don’t really understand we use it already, for example on the simple is better than complex, just as our last blogs that is just, print, or calling a function, etc.
This is our expression after knowing the Zen of python.
https://www.python.org/dev/peps/pep-0020/#id3
Use of loops with while
We already know the command while, but this comes a rather.. funny exception with loops, making it repeat until all the criterias are accomplished, let’s put it easier.
http://www.python-course.eu/python3_loops.php
So until the condition is satisfied it will keep running until it is realized, Continue reading "Prepare for trouble! And make it double!"