#WSQ14

Scilab is free and open source software for numerical computation providing a powerful computing environment for engineering and scientific applications.

I used this video for start using this program:

Proyecto Final

Mi proyecto consistió en crear una maquina arcade con una Raspberry Pi. Fue un proceso largo más no difícil. Proceso que decidí hacer en dos fases, la fase de diseño y programación y la fase de ensamble y construcción del tablero arcade. En este post pondré todos los links que me proporcionaron información. Si quieren hacer este proyecto y tienen alguna duda no duden en contactarme. No publicare mis diseños de la maquina arcade pero si los necesitan, pídanlos.

Here are the links:

https://github.com/retropie/retropie-setup/wiki/First-Installation

Aqui hay fotos de mi proyecto:

 

#WSQ10

It is me again with a new post. First of all this code was kind of difficult for one reason, I had no freaking idea how standard deviation works. That was my main problem, until I understood how it works, I mean the math, then I could do the code.

Well, now I´m going to explain what I did. First I include the two libraries I am going to use, in this case is iostream (the one we always use) and math (witch is for math stuff, like power and square root). I forgot to mention that my program should ask for 10 numbers, and make 3 different operations with them and print each result. This operations are sum, average and standard deviation. First what I have to do is ask for those numbers and with that data I should make an array. So I have to ask ten times for ten different numbers, what I did instead of making ten times, I did for loop witch will do what I just explain. What is next in my int main is the lines that print the result for each operation, for being more exact it is printing the result of each function. Then I declare 3 functions, each one will do different things. As you can see my 3 functions are almost the same, they are declare the same way, they use the same information or data and also they use a for loop for solving the problem. The only difference is that the math is different, so you have to change some little things in order to make the function do what you want.

Here is my code: https://www.dropbox.com/s/0iql47lr23x5kkn/wsq.cpp?dl=0

Captura de pantalla 2016-03-15 a las 10.38.06 a.m.

Captura de pantalla 2016-03-15 a las 10.38.18 a.m.

imagen thanks

#WSQ09

Hello again, I was too busy for doing post, but now I have some time for doing some posts. Well for this WSQ we where ask for this:

“Create a program that asks the user for a non-negative integer (let’s call that number n) and display for them the value of n! (n factorial).

After showing them the answer, ask them if they would like to try another number (with a simple y/n response) and either ask again (for y) or quit the program and wish them a nice day (if they answered n).”

Well solving this problem was very simple. Fist what I did was to declare two variables, fac and x. Fac is for the number and x if for a yes or not. Then we ask for the first value, the number. And then we call the function.

Captura de pantalla 2016-03-08 a las 12.13.49 p.m.Captura de pantalla 2016-03-08 a las 12.13.59 p.m.

Here is the link for you to download my code and play with it: https://www.dropbox.com/s/idgvdui4oy2djof/fac.c?dl=0

 

#WSQ7

Well fools this is my last post of this first period. and will be about making a program that add a range of numbers. For example the range is 2 to 4, so the sum will be 2+3+4=9. so this program could make the sum for any range of integers numbers.

Now I am going to explain how I did it. First, as always I declare my variables, in this case I used num1 one (for the lowest number in the range), num2 (for the highest number in the range) and sum, witch will have a value of 0 at the beginning of the program. Then I used a do while loop witch will work until num1 is >= num2. And while this condition is true, the program will do this simple math. As I said sum at the beginning will be 0, then it would do the mat and then it would have the value of the result. As you can se after we did this operation, you add 1 to num1 until the condition is true.

Here is the link for you to download my code:

https://www.dropbox.com/s/1tsc0vzsx8cp5fh/suma.cpp?dl=0

Thanks fools!!

Captura de pantalla 2016-02-18 a las 10.19.08 p.m.imagen thanks

#WSQ06

Hi there, this new post is about doing a program that generates a random number between 1 and 100 and you have to guess it. It´s a game, it is fun, I have been playing for hours with my code. This code was complicated because you have to use some new things, such as libraries that you often do not use. I made some comments in my code for you to understand what I was doing, or what it suppose to do that part of the code. So as I say it was a little bit complicated and I have to look up for some information on the internet. So this code it is a little bit complicated for me to explain it with words, so I am going to put the video where I learn how to do it.

Thanks fools!!

Heres is the link of the video:

And here is the link of my code. I beg you to download it and play with it, it is very fun:

https://www.dropbox.com/s/82tohs4ryo5rw1v/1.cpp?dl=0

Captura de pantalla 2016-02-18 a las 9.28.28 p.m.imagen thanks

#Quiz 3

maxresdefaultHello again. As you can see we had a third quiz. God I really hated them but that does not matter, I have to do it. So even I hated them, I did it and here is my post.

Problem 1:

  1. Write a function called distance (x1,y1,x2,y2) which receives four numbers which represent two points in the cartesian plane. The function should return the distance between the two points (x1,y1) and (x2,y2). Remember that the square of the hypotenuse of a right angle triangle is equal to the sum of the squares of the two other sides.

So that was the problem, now I am going to explain what I did in order to solved it. Well the problem was very simple, you just need to calculate the distance between to points given by the user. So first you need to have those points. You declare four variables, in this case I used x1 and y1 for the first point and x2 and y2 for the second point. Then you proceed to ask to the user the value of each variable and you stored the value in the variables you just declare. You ask for the value using a cout and then you store the value using a cin. Then what I did was to create a function for doing all the math stuff. As you can see, I write the function at the bottom of my code, just after the int main, and then I declare the function at the beginning. That is my style but you could also just write the function on top of the code (before the int main) and it would work. So in my function what I did was declaring two more variables d and c witch would be the result of x2-x1 and

Captura de pantalla 2016-02-18 a las 6.37.53 p.m.
Captura de pantalla 2016-02-18 a las 6.38.06 p.m.
Captura de pantalla 2016-02-18 a las 7.21.59 p.m.

Continue reading “#Quiz 3”