lunes, 19 de septiembre de 2016

About Page

Well my blog is not only about programming, I also like to share some of my hobbies with you guys, and in this case I wanted to make the excersice WSQ04 to share some information about me.
First of all I am studying this degree because since last year in the secondary school I found out that I love computing topics, and I learned a little bit of programming with "KAREL" and I learned a little bit of Java in high school.
I've had some doubts about my election of degree, but after thinking about what I like, and what am I good at, I believe that I made the right choice.

Well I love to travel, but I'm not able to go a trip really often, so ocasionally when there's an opportunity to leave Gdl for a while and know other places I just take it 'cause it's pretty cool to learn about other cultures, or just see what's going on in the world.

I love music, and my favorite band is "Depeche Mode", I've been listening to their music since I was a baby, so I think that's the main reason why I love this band, and just in case you don't recognize the name of this amazing band I recommend you guys to listen this song: Personal Jesus - DM
Also, I love rock-metal bands such as "Evanescence" & "Marilyn Manson".

I like to read in my free time, and basically my favorite author is Tonya Hurley 'cause she wrote the Ghost girl & The Blessed saga, and the topics that she choose are pretty awesome, and she left important messages on the books about life, friendship, family & love. I think that she's like Tim Burton because of the way she writes, and I really enjoy what they both do.

Last but not least, I also love to cook (specially desserts) and I like to share my receipes, and the food that I make with my friends and family; the first cake that I made was a red velvet, and the second cake was of chocolate & coffee, so I hope one day to be able to share with you guys some of the food that I make.


I would like to know more about my classmates, so if you want to share something about yourselves (favorite food, music, band, book, hobie, etc..) please leave a comment in this blog post :)



extra info... I like anime ~^w^~

WSQ03 – Fun With Numbers

 

Well, in this ocasion I wanted to make and share with you guys one of the hw from the last year, today I made the WSQ03. Below you'll see the instructions that I follow to create my code.

What to Do



Click image for source.
Ask the user for two integer values, then use those two values to calculate and show the following:

  • The sum of the two numbers.
  • The difference of the two numbers.
  • The product of the two numbers.
  • The integer based division of the two numbers (so no decimal point). First divided by second.
  • The remainder of integer division of the two numbers.
First of all I started my code with 2 inputs, so the user can introduce 2 integer numbers. I defined each one as a & b.
After this I started to do write down what I wanted to do: sum, rest, multiply, divide integers and with decimals.

  After that I open the python shell, and I ran the program


After that I wrote 2 random numbers, and then the program gave me the results 
 
Then I decided to try the program again just to make sure that it works correctly.


And that's it, to see more excercises go to http://kenscourses.com/tc101fall2015/tag/wsq/

 

domingo, 11 de septiembre de 2016

Utilizando "elif"

Si bien, al momento de programar podemos utilizar el condicional "if", el cual debe llevar consigo un "else", esta condicional funciona para comprobar si los datos que se tienen cumplen o no con los requisitos que proponga el programador.
Por ejemplo: 
if pastel = "chocolate":
     print ('Compraré el pastel')
else:
     print ('No compraré ningun pastel')


El problema con esta condicional es que solo tienes dos opciones, en cambio utilizando un "elif" tienes la oportunidad de contar con diversas opciones y diferentes respuestas por parte del programa, a continuación compartiré un ejercicio sencillo que hice utilizando este condicional.


En este caso defini mi variable Mickey = "mouse" y di la oportunidad de que se tuvieran otros animales como opciones, para no centrarse unicamente en o es un ratón o no lo es.
En el primer caso dejé que mi variable fuera verdadera, imprimiendo 'He is a Disney character"; pero en la siguiente imágen verán que la hice falsa para utilizar el "else".

                                                  Espero les sirva mi ejemplo :)


Para hacer el ejercicio anterior vi el vídeo de la siguiente liga: Elife
Y para ver otro ejemplo pueden entrar al siguiente link: https://www.youtube.com/watch?v=42MBMSOZgD4

Uso sencillo de while

Si bien, "while" es una herramienta muy útil que se utiliza cuando tenemos claro cuantas veces queremos que se repita una acción. A continuación les compartiré un ejercicio que hice:

 Lo primero que hice fue definir mis variables "suma" y "n", en el cual n será cualquier número entero, pero en el while defino que "n" debe ser un número menor a 20.
Después quiero que me muestre los números que se abarcan de n + 1, tomando en cuenta que n vale 0, pero que es un número menor a 20.

Para ver otro ejemplo pueden ingresar al siguiente link: While en Python

jueves, 1 de septiembre de 2016

Well my blog is not only about programming, so I wanted to share my favorite song with you guys, and I hope you like it Precious - Depeche Mode :)

 
Also I wanted to invite you guys to like my fb page Millas-Vitches
(By the way sometimes I just start writing in English and other days I just want simple things, and I write the hole blog post in Spanish, so I hope you guys have no struggle with it) 

Now going back to business... Today I will explain how to...


Import & use libraries

First of all I want to share a link that shows 20 libraries that people can import in Python:  20 librerias irresistibles
Now, I'll show you how to use the math library :)
 
Para ver el vídeo que explica lo anterior puede entrar aquí: Librerías