Hug me very tight

--Originally published at Introduction of Programming

Today two months ago a star that was shining in earth took off its flight to reach the sky.

Alberto Aguilera Valadez passed away the 28th of August leaving with us all his memories and remarkable records. We live his legacy listening his songs and proudly singing.

This post is dedicated to Juan Gabriel, sharing his songs we´ll be sure that his legacy will live forever.

 


Differences between If, Else and Elif

--Originally published at Introduction of Programming

To understand the conditional, first we have to know what is a control flow. normally it follows a linear path.

Conditionals introduce a branch in the control flow, when you make an “If” it will ask if its true or false, depending on the result it will follow a path.

else is another statement inside the “If”, it will optimize your program in order to do not write again the “If” conditional.

“Else” allows you to follow a path when the main statement is false, so your program will continue.

 

fqjobus


If conditional

--Originally published at Introduction of Programming

it is maybe the most famous conditional in programming, it works when you want to divide a statement between true or false, in other words Boolean logic. “If” conditional is composed by the main statement, the true and the false answer.  There are many others options that can be added to the “If” conditional as “else”, “elif”, etc.

these conditionals are just to improve your main statement.

 

In this code we used the If statement with the positive answer to the statement, elif works as another conditional inside the If. Else works as the negative answer to the main statement.

screen-shot-2016-10-26-at-11-38-18-pm


Python´s calculator trick

--Originally published at Introduction of Programming

 

En Python  contamos con un gran numero de herramientas en base a la programación, una de ellas es la calculadora, el realizar cualquier tipo de operaciones en base a lo que nosotros pidamos.

en el tutorial, podemos ver un ejemplo del uso de la calculadora como calculadora

w

En este caso realizaré una multiplicación sencilla utilizando variables (no es necesario el uso de variables). en el cuarto reglon podemos ver que a la variable “t” se le agregó un renglón en la suma, ese reglon es una variable independiente que python 3 reconoce, esa variable toma como valor el último número impreso. después si le aplicamos el atributo “round” podemos redondear el número a las cifras solicitadas, en este caso se redondeó a 2 cifras antes de los enteros.

e


Necesitas practicar en Python?

--Originally published at Introduction of Programming

El día de hoy fui a la oficina de Ken a preguntar ¿de que forma puedo practicar en Python y saber que estoy haciendo bien? ¿acaso puedo ver algunos resultados de esos problemas? y Ken me guió a su pagina de hace un año en el que dejaba tareas, el link es este, en ese link pueden ver las tareas que dejó, y los resultados pueden verse buscando el código de la tarea (ejemplo: “wsq00 -Sign page one”, el link sería :wsq00) de esa forma podremos ver los resultados de los estudiantes del año pasado

verán algo así…

Screen Shot 2016-08-31 at 10.31.40 PM


Data-type methods

--Originally published at Introduction of Programming

 

2

Python tiene muchas variantes para poder modificar la información que ingresas en el sistema, este es un ejemplo de como puede ser modificada; con string.capitalize() puedes hacer que de las palabras que ingreses, la primera letra la conviertas en mayúscula. esto es utilizado para la ortografía.

String.format() es un recurso para introducir strings a tu programa de una manera más sencilla, esto es útil cuando manejas grandes cantidades de información que se tienen que repetir.

String.strip() es utilizado para eliminar espacios en tu información ingresada


Philosophy of python

--Originally published at Introduction of Programming

Python has a code that shows a list a special rules, metaphors of how to program and (in my humble opinion) how to have a better life…

bildschirmfoto-2016-08-25-um-11-02-20

 

phrases as: “errors should never pass silently”, “now is better than never”, “special cases aren´t special enough to break the rules”… all of those can be relationated with daily life´s situations. Your interpretation is the only that matters. follow those metaphors not only for programming. be a better person before a better programmer…

vgreatgatsby-490x326


Conditional statements

--Originally published at Introduction of Programming

check this blog! hope it help you much as it helped me

Programming

If-Statement

It’s time for us to talk about the conditional statements. First we are going to talk about the if statement. the if statement is a way to make your computer program make a very simple decision. An if-statement is followed by an indented block of code that is run if and only if the expression is true. Say we want to make a program that asks for a person’s age and if his/her age is equal or greater than 18 we print a message to the screen.

2.png

Expressions can be tested in several different ways. Here are some of the most common ones:

1.png

*Note: When comparing two strings or numbers you can use the keyword is to check if they are the same.

Else-Statement

If the expression within the if statement is false, then the program will look for an else statement, which is the statement that will be…

View original post 192 more words