Hi Universe

--Originally published at Python & pugs

helloworld

Where does this phrase comes from you may be wondering; well I have the answer for you folks!

Whoe wrote “Hello world” for the first time?
–     Brian Kernighan

He used it on a lenguage called BCPL, that it was used while C  was being developed.

Hello World was one of the first programs to test C++.

Here’s a little video of Hello World’s example in different languages (Programmings languages :P):


ZZZZZEN of Python

--Originally published at Python & pugs

"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!"

A beautiful poem for geeks like us.

These are also the principles for the using of Python, made by Tim Peters.


Creating/Calling functions

--Originally published at Python & pugs

For the creationf/calling of a function, you need first to call it by writing “def” in the beginning of the sentence, and “:” at the end, like this:
def name():

Now you have to give the function a purpouse:

def name():
example (“Functions”)
print(example)

After all this, you need to close the sentence with the name of your function:

def name():
example (“Functions”)
print(example)
name()

Haga click para ver el pase de diapositivas.

 


Input = Putin (Illuminati)

--Originally published at Python & pugs

 

tumblr_nd2v3if21H1qdjbb7o1_500.gif

When you have an Input in a code, is just like if the code is asking you for something, and you’ll have to introduce it.

Just as easy as this:
age = input(“What’s your age? “)
//There you’ll have to give an answer like your age

After it, you can use the input in other part of the codes, just like in the next example:
print(“So your age is “+ age + ” years”)

There it is! Input in easy steps!

InputInput.2Input.3