Publicado en Programming

Todo acerca de Ken :)

Desde una primera impresión donde creía que el profe iba a ser de los mas estrictos en programación, hasta donde ves al profe como un amigo.

Al hablar de la clase de Ken obviamente ya has escuchado comentarios de ella, ya sea desde que no aprendiste o hasta el profe me hizo destacarme y hacer cosas que no creí que haría en primeros semestres.

El curso de Ken fue uno como nuca había tomado antes, una clase en donde si tu querías te pudieras destacar de los demás, una clase donde aprendes algo mas que programar, sino responsabilidad, digo esto porque porque el sistema era un poco inusual…a que me refiero con esto???, a que no había fecha de entregas, los exámenes no contaban como puntos y tu mismo te evaluabas.

Al principio me pareció algo raro, de como podia hacernos esto 🙂🙂🙂, pero con el paso del tiempo me di cuenta que era lo que el quería, el quería inculcarnos un sentimiento de responsabilidad, uno de prepararnos nosotros mismos para la vida ya que no todo iba a ser muy fácil.

En la clase de Ken enserio creo haberme destacado, yo un joven de grandes aspiraciones que aprendi hasta de mas en este curso 😝.

Una de las cosas que mas me gusto de la clase de ken fue acerca del proyecto final, ya que no nos ponía limitaciones de que pudiéramos hacer, y aunque no expuse en expo-ingenierias siento que yo mismo como persona me destaque porque hice un robot controlado con arduino que bailaba y detectaba objetos, cosa que nunca me imagine que haría en primeros semestres.

Pudiera resumir que el curso de Ken es especialmente para personas que les guste destacar, ya que si solo vas para pasar, no tiene sentido el curso, esta materia creo que me sera de gran ayuda en un futuro y espero otros días volver a visitar a Ken a su oficina  😄.

Es dura una despedida pero no me queda mas que agradecer a Ken por hacerme crecer como persona  😄.

Gracias.🤘🤘🤘🤘🤘🤘

El fin de los blogs…?

Publicado en Programming

Final Project (in process)

Well, in this blog I am going to explain what are we going to do in our final project, in whats we are working, whats things we have do, whats things are in process, what we have learn it and more. 🙂

The Team:

  • Marijose Santoyo ♣
  • Irlanda de la Torre ♦
  •  Oscar Herrera ♠

So, what are we going to do??????……

The thing in what are we working is a glove that receives motion signals for our hands that can control almost everything depending the how we program it 👀👀👀👀

FLM2HIEHWG095RA.LARGE.jpg

With this glove we can almost do everything we want 😜, so with what are we working????F6RIPAPHQF9H5IO.MEDIUM.jpg

This is an arduino uno, Arduino is an open-source electronics platform based on easy-to-use hardware and software.Arduino boards are able to read inputs – light on a sensor, a finger on a button, or a Twitter message – and turn it into an output – activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing 🙂🙃.

We already are working in how does an arduino works, and we found out a lot of things, so we are doing like mini projects to know more how to use correctly an arduino and to know how the glove is going to work.

We don’t have the parts that we are going to need to use the arduino, but we already have a lot of things to work in the mini projects 👀👀👀👀, so basically we are waiting the controllers that we are going to need and while we are working in how know more the arduino 😄.

So this is all for the moment, later we are going to write another blog with our progress in the project  😄😄😄.

Images from: https://programarfacil.com/blog/breve-introduccion-al-arduino/ http://www.instructables.com/id/Beginner-Arduino/ https://www.hackster.io/Gabry295/how-to-make-a-remote-controlled-robotic-hand-with-arduino-32b0f5?ref=channel&ref_id=424_trending___&offset=241

Publicado en Programming

Well… :) not to easy

This was the problem:

Create a program that asks the user for 10 numbers  (floating point). Store those numbers in a list. Show to the user the total, average and standard deviation of those numbers.

This was a hard one, in this problem you need to convine everything you know about programming till now… so, not to easy.

The first thing that I do was doing an array of 10 digits and a cout to the user can type his 10 numbers, then I add a counter to now how many times I am going to put a number, and I make a operation that does that the numbers going to add each other, then I put that the average is equal to the sum divided the times I put a number, that was all in the first part.

The second part was to make a function that gives the standard deviation of the numbers I put (image 2), so I search on internet what to do to make that operation and I do the same as the average but a little different, it was a kind of pitágoras.

Captura de pantalla 2017-03-06 a la(s) 08.59.02.pngCaptura de pantalla 2017-03-06 a la(s) 08.59.15.pngCaptura de pantalla 2017-03-06 a la(s) 09.01.05.png

Publicado en Programming

Quiz 9!!!!

 

This quiz was easy af!!! ….. well not at all 🙂

This was the quiz:

Write a function that receives four parameters: x1, y1, x2, y2 which are all floating point values.

The function is called distance and returns (float) the distance between x1,y1 and x2,y2 on the cartesian coordinate plane.

So, to solve this quiz you need to think hard, very hard, very very very hard!!!!!!, just kidding, you only have to use logic :p

Lets suppose that you have to points in the space x and y but these seams very familiar isn’t it? I think they are going to form a triangle and the space is the hypotenuse, lets see it like this el-plano-cartesiano-7-638.jpg

and then everything is solve, yo just only have to write your program like every time and everything is solve Ta Daaaa. 🙂

See you laterrrrrr.

Captura de pantalla 2017-03-11 a la(s) 09.23.56.png

Publicado en Programming

FactorialCalculator???

Well, I do no what is a factorial…. 😦

So in order to solve this problem I search on the most trusthly page on internet… Wikipedia, then I notice that a factorial is :

In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example,

5!=5×4×3×2×1=120. 5!=5\times 4\times 3\times 2\times 1=120.\

So the problem was 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).

And then to solve this problem I put my normal main and later I do my function that says that is going to start in 1 because cero isn’t important, so while c is less than 1 is going to sum 1 till reach that number that the user input, and then is going to return me the new value that is going to be a or the result :).

captura-de-pantalla-2017-02-27-a-las-11-12-10

vLYLQ.gif

 

Image from: http://weknowmemes.com/2012/07/fuck-you-science/http://giphy.com/gifs/math-zach-galifianakis-the-hangover-5yLgoczEvFoE5LyoiZO

Publicado en Programming

Functions??? Againnnnn???

Wellllll…. Again pffff.

The problem was this:

You will go back and do WSQ01 – Fun with Numbers again.

But this time, write a function for each calculation. Each function should define two parameters (in this example of type int) and return the correct value as an integer as well.

You main program needs to ask the user for the input and then call each function to calculate the answer for each of the parts.

So I use my older program and I start work in there, the only different thing that I do is that in this program I am going to use functions.

So I do thissssss, I give name to my function, then I put the values as int that are going to be on my functions, then I give value to my function and then return my function and the other functions was easy tooooo, the only thing that I do was change the operation of my function for what I suppose to need. And I do everything in one program why not?

Like this:captura-de-pantalla-2017-02-27-a-las-11-07-59

Image from: http://mathematicaled107.blogspot.mx

 

Publicado en Programming

Fibonacci

So the problem was make to a program to do a fibonacci serie, so in order to do it I search on internet what a fibonacci serie is, and I found that is a serie that sum the two last number and converted in a new one like 2 + 3 = 5 then the next number will be 5 + 3 = 8 and like that until ends, so in order to not crash my computer I put in the main that the user write how many digits the serie would have :).

I made two programs that does the same thing, the only deference is that one uses functions and the other not.

In the program with the function I start writing my function starting on 0 that in case that the user type 0 or 1 is going to return me that number, and in case that the condition doesn’t be true then is going to return me the number – 2 + the number -1 making a serie, but that only is going to one time, so I use a do while to print all the values of the serie, then I use a for to make all the serie appears and thats all :).

And in the other program because the first to number there are not going to repeat I printed first with a cout and then I use my for to start and finish the serie depending the conditions.

And here is and image of jumping corgi in the snow :).

funnocaptura-de-pantalla-2017-03-02-a-las-09-02-46

Have fun

Image from: http://www.artifexbalear.org/img/fibonac8g.jpg and  http://buzzsharer.com/wp-content/uploads/2015/06/jumping-corgi-winter.jpg

 

Publicado en Programming

Quiz 6

In order to do this quiz I search the information in one site: http://www.cplusplus.com/reference/

We have to solve 5 problems; the first one was about correcting one program and run it, so I use two new libraries in order to solve the program and start testing and rewriting the program, and the final result was this:captura-de-pantalla-2017-02-13-a-las-09-08-45captura-de-pantalla-2017-02-13-a-las-09-09-01

The second problem was about writing a program to read in a character, an integer, and a float, and print out the values, then cast to other types; so that the interaction with the user is something like the following:

captura-de-pantalla-2017-02-22-a-las-21-25-57

captura-de-pantalla-2017-02-22-a-las-21-26-06

The next program was only about to the following pattern:

                        C
                      i   I
                    s       s
                  b           b
                e               e
              s                   s
            t s e b s i C i s b e s t

 

So the only thing that I have to do was print the letters in that order and that was allcaptura-de-pantalla-2017-02-13-a-las-09-42-22

For the fourth problem they ask us to write a program to read three ints and to print them in ascending order, so the most easy thing to do was using a lot of if and else to solve this problem:captura-de-pantalla-2017-02-22-a-las-21-31-32

captura-de-pantalla-2017-02-22-a-las-21-31-43

And the last problem they ask us to write a program given the following rules, write a program to read a year (4 digit integer) and tell whether the given year is/was a leap year.

  1. There were no leap years before 1752.
  2. If the year divides by 400 then it is a leap year.
  3. All other years that divide by 100 are not leap years.
  4. All other years that divide by four are leap years.

So I use the main if as 1752 because if that wasn’t true then the year will be normal, the I use another if to say the conditions when the year will be leap, and finally I use an else in case the other conditions wasn’t true.

captura-de-pantalla-2017-02-23-a-las-08-29-54

captura-de-pantalla-2017-02-23-a-las-08-30-04

And that was all, see you next time :).

Image from: http://interactive.wttw.com/whereinchicago/quiz

 

Publicado en Programming

Quiz 4

For this quiz we have to do this:

For this quiz I want you to (in class) create a program with two functions:

  • int minimumThree(int x, int y, int z){ }  // returns the value that is smallest of x, y and z
  • int sumSquares(int x, int y, int z) {}  // returns the value of the sum of squares of x, y, z

You should make a main routine that asks the user for three numbers and then calls your functions to which should *RETURN* the value and you print in the main program.

So I started writing my program normally, declaring my variables, naming my functions and to make the user to write the three numbers.

captura-de-pantalla-2017-02-02-a-las-09-28-40

Then I make what my functions would do, that says in the first function that I am going to multiplied my variables with the function «pow» and in a parenthesis my variable «,» and the number I want to multiplied my variable, in this case 2 for square and the sum the operations.

And on my second function I put conditions with if and else to make the program know what number is bigger than the other and finally printed on the result.

captura-de-pantalla-2017-02-02-a-las-09-28-52Image from: http://www.quizfactor.com/quiz/general-knowledge/5

#Quiz04

Publicado en Programming

Sum of Numbers

This was the problem:

Write a program that asks for a range of integers and then prints the sum of the numbers in that range (inclusive).

You can use a formula to calculate this of course but what we want you to do here is practice using a loop to do repetitive work.

For example, the sum from 6 to 10 would be 0 + 6 + 7 + 8 + 9 + 10.

I start declaring normally my variables as integers and one different that I give him a value «suma= 0» later I will explain that, and one variable as character «con».

I start my main asking the user t put the ranges of the sum and then I put and if in case if the range one was lower than the range two.

Then I put a loop with a loop while that says that the result is going to be equal to the result plus one while range one be lower than range two and every time that the operations happens range one is going to be one number more that it was until be the same as range two, and finally put the result of the sum.

captura-de-pantalla-2017-01-23-a-las-09-09-43

#WSQ04

Image from: http://www.clipartbro.com/categories/greek-symbol-for-sum-clipart