Burgers In-n-Out for free woohoo!

--Originally published at M E R I N O

Disclaimer: There are no free burgers. Sorry.

Input and Output:

L e t ‘ s   G o (Input):

To input text into a program, we use: input(“Text you can see”). You can play with this too, you can specify what type of input you want like int(), float(), etc. you can find the types of variables of python here.

Ruuuuuuun (Output):

To write an Output we use: print(“Text you want to print”)

Here is an example of bothCaptura de pantalla 2016-09-11 a la(s) 23.40.27.pngCaptura de pantalla 2016-09-11 a la(s) 23.40.41.png

For more details, visit this page. Thanks for reading


You’re not my Type sorry

--Originally published at M E R I N O

Variables:

First, we have to know what is a variable?

In programming, a variable is a value that can change, depending on conditions or on information passed to the program

-WhatIs.com

Now, we know what is a variable but… How do I assign it?

To assign a variable you just need to add the equal sign (=) that’s it, you now have a variable… Kinda.

Also you can do multiples assignments like this:

Or assign the same value to different variables like this:

 

Types of variables:

There are 6 main datatypes of variables.

1- Numbers:

In this category are 4 “subcategories”:

  • Integers (int)
  • Long Integers (long)
  • Floating point real values (float)
  • Complex Numbers (complex)

Here are some examples:

captura-de-pantalla-2016-09-11-a-las-20-37-28

captura-de-pantalla-2016-09-11-a-las-20-38-17

2 -String:

In a string variable you can add any type of characters, number, symbols letters, you only need to add “” and write whatever you want, like this.Captura de pantalla 2016-09-11 a la(s) 20.40.43.png

 

3- List:

In this variable you can add various values to a single variable, you declare it with [] and separate the values with a ” , ” like thisCaptura de pantalla 2016-09-11 a la(s) 20.49.27.pngCaptura de pantalla 2016-09-11 a la(s) 20.50.01.png

Then you can choose the value you want or the range of values. For a single value you only write between the [] the number in which the value is positioned, be careful because in Python, the first value is the value 0

Captura de pantalla 2016-09-11 a la(s) 20.50.41.pngCaptura de pantalla 2016-09-11 a la(s) 20.51.09.png

Captura de pantalla 2016-09-11 a la(s) 21.03.25.pngCaptura de pantalla 2016-09-11 a la(s) 21.03.42.png

To remove an element from the list, you can use del list [#]  or you can use list.remove (“value”). It only takes out the value but the sequence keeps going with the next value . Here is an example:

Captura de pantalla 2016-09-11 a la(s) 21.07.45.png
Captura de pantalla 2016-09-11 a la(s) 21.08.02.png

Also you can change or update the values of a list, like this:
Captura de pantalla 2016-09-11 a la(s) 22.16.10.png

Captura de pantalla 2016-09-11 a la(s) 22.16.35.png

4 – Tuple:

A Tuple is like a list, but less flexible and instead of using [] we use (). You can’t replace values. Example:Captura de pantalla 2016-09-11 a la(s) 22.04.52.png

Captura de pantalla 2016-09-11 a la(s) 22.05.33.png5-

Captura de pantalla 2016-09-11 a la(s) 22.11.10.png
Captura de pantalla 2016-09-11 a la(s) 22.11.23.png
Captura de pantalla 2016-09-11 a la(s) 22.21.35.png
Captura de pantalla 2016-09-11 a la(s) 22.21.56.png
Continue reading "You’re not my Type sorry"

Movie Recommendation. Yay!

--Originally published at M E R I N O

WHO AM I: Kein System Ist Sicher

Or in other words “WHO AM I: No System is Safe”. This movie it’s not only a movie, it’s THE movie.

Spoilers free.

It’s a German movie about Benjamin, a young computer hacker is invited to a group of hackers to form a team with the purpose of having fun and to get noticed by the world like anonymous. They follow 3 rules: #1 No system is safe (duh), #2 Aim for the imposible, #3 Have fun in cyberspace and meatspace. But something went wrong when they messed up with a very powerful hacker…

It’s hard to do a summary of this movie without telling spoilers but I really recommend this piece of art. It was first screened in 2014 at the Toronto International Film Festival and has won several awards.

9.5/10

You can learn more here and here.mv5bndg4nju3mtyznl5bml5banbnxkftztgwnze2mdu2mje-_v1_sy1000_cr007071000_al_


Peace, no matter the cost.

--Originally published at M E R I N O

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!

This are the principles of Python. Also is an Easter egg you can find in Python, just open a terminal, run Python and type “import this”.

I’m not really a professional in the topic so if you want to learn more about what each line  you can click here.


Este código era para… Uhh…

--Originally published at M E R I N O

Usa comentarios en tu código. Son muy sencillos de hacer y son muy útiles cuando estás programando con otras personas o si quieres utilizar tu código en el futuro, puedes saber para qué sirve cada cosa.

Comentarios en Python son muy sencillos en realidad. Hay 2 tipos de comentarios: los de una sola línea y los de líneas múltiples.

Comentarios de una sola línea:

Los comentarios de una sola línea son útiles cuando queremos hacer notas rápidas o no vamos a escribir mucho texto. Podemos señalar los tipos de variables si aún somos nuevos y se nos olvidan los nombres.

Captura de pantalla 2016-08-22 a la(s) 12.21.29

Comentarios de líneas múltiples:

Este tipo de comentarios son útiles para dar una descripción amplia de un código. Se puede poner en la parte superior para explicar lo que hace un bloque o al inicio.

Captura de pantalla 2016-08-22 a la(s) 12.39.24