My first C++ program , using Atom and Ubuntu bash on Windows.

--Originally published at |Blogging through my thoughts|

**Updated post**

Hello! curious readers. “Fun with numbers” is the first problem that Professor Ken Bauer assigned us.  The task was to create a program that complies with the points shown in the image and thereby solve the problem.

The language is simple to understand once you study a little. The book “How to think like a computer scientist” was very useful to conceive my code, in addition to several videos of youtube.

I hope you like program and really understand the whole code ?

Luis Felipe Garate Moreno.

WSQ01UBUNTU
Ubuntu bash
WSQ01ATOM
Atom code
masterytopicsHELLOWORLD
Mastery topics

 

 


Todo acerca de Ken :)

--Originally published at Tec Life

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

?
?
Continue reading "Todo acerca de Ken :)"

Omaigaaaa!!! ????

--Originally published at Tec Life

En la clase de Ken el nos hablo de un test de personalidad, y el resultado enserio que no me lo esperaba ???, jajaja.

Estos fueron mis resultados:

Captura de pantalla 2017-03-30 a la(s) 09.10.55

Resulta que mi personalidad es de tipo ENFJ-A lo cual se define por esto:

Los ENFJ son líderes natos, llenos de pasión y carisma. Representados por alrededor del dos por ciento de la población, son muchas veces nuestros políticos, nuestros entrenadores y nuestros maestros, quienes se superan e inspiran a otros a superarse y hacer el bien en el mundo. Con una confianza natural que conlleva una influencia, los ENFJ sienten gran orgullo y alegría al guiar a otros para trabajar juntos para mejorar ellos mismos y su comunidad.?

Otra cosa de las personas con esta personalidad dice queson altruistas apasionados, a veces incluso demasiado, y es poco probable que tengan miedo de tomar los arcos y flechas para defender a las personas y las ideas en las que creen. No es de extrañar que muchos ENFJ famosos son presidentes de EE.UU. – este tipo de personalidad quiere liderar en el camino hacia un futuro más brillante, ya sea llevando una nación hacia la prosperidad, o liderando su pequeño equipo de softball de la liga a una peleada victoria.

Y estos son algunos personajes famosos que son el mismo tipo de personalidad.? ?

Captura de pantalla 2017-03-30 a la(s) 09.14.56

Captura de pantalla 2017-03-30 a la(s) 09.15.21

“Todo lo que haces en este momento se proyecta hacia afuera y afecta a todos. Tu postura puede iluminar tu corazón o transmitir ansiedad. Tu aliento puede irradiar amor o ensombrecer la habitación de depresión. Tu mirada puede despertar la alegría. Tus palabras pueden inspirar a la libertad. Cada acto tuyo puede abrir los corazones y las mentes.”

WSQ09 :)

--Originally published at Tec Life

So, hello againnnn, this is the problem for this week:

Create a function that receives as parameter the name of a file (this would be a string value like data.txt) and your function counts the number of lines and the number of characters in the file which it returns as a single value (but with two values). You will want to look at how to create/define and return a struct value from a function and how to open and read text files line by line.

So, how do I start???

First of all I include to new libraries :

  1. fstream: To be able to read a file.
  2. String: To use my get line function.

Then I declare my to variables “palabras and lineas” with a value of cero, then I make that my program will make a text file called texto.txt and then I put my if stream because we are going to put things on the program in other words “if = in, ofs= out”.

Then I make to open my file with open and the name of my file, and what would happened if it fail and to do that while is open and its going to add one value to lineas and palabras.

I really don’t know how to explain it right because if you don’t know so much things you will never know what I am doing. So read your textbook and search information on internet about this problem, because it was a hard one.

See you laterrrrr.

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

Image from: https://clipartfest.com/categories/view/382647a840319bed4aa74f8b873e6b3c85a45d91/open-book-with-words-clipart.html


WSQ09 :)

--Originally published at Tec Life

So, hello againnnn, this is the problem for this week:

Create a function that receives as parameter the name of a file (this would be a string value like data.txt) and your function counts the number of lines and the number of characters in the file which it returns as a single value (but with two values). You will want to look at how to create/define and return a struct value from a function and how to open and read text files line by line.

So, how do I start???

First of all I include to new libraries :

  1. fstream: To be able to read a file.
  2. String: To use my get line function.

Then I declare my to variables “palabras and lineas” with a value of cero, then I make that my program will make a text file called texto.txt and then I put my if stream because we are going to put things on the program in other words “if = in, ofs= out”.

Then I make to open my file with open and the name of my file, and what would happened if it fail and to do that while is open and its going to add one value to lineas and palabras.

I really don’t know how to explain it right because if you don’t know so much things you will never know what I am doing. So read your textbook and search information on internet about this problem, because it was a hard one.

See you laterrrrr.

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

Image from: https://clipartfest.com/categories/view/382647a840319bed4aa74f8b873e6b3c85a45d91/open-book-with-words-clipart.html


Final Project (in process)

--Originally published at Tec Life

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

?
?
?
Continue reading "Final Project (in process)"

Well… :) not to easy

--Originally published at Tec Life

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


Quiz 9!!!!

--Originally published at Tec Life

 

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


Quiz 3

--Originally published at Solving problems with programming

In quiz number 3 we have to do 2 funtcions. The first on has to return the smallest number of 3 numbers that the user gives. You are going to use conditionals and  comparisons to get the samller number. But there is a problem, if there a two numbers that are equal and he the smallest you have to manege it. What I did is tell the user that are 2 numbers that are the smaller but are the same. I know there is another way to solve it better, I need to check the block of my classmates to find a better answer. The Second Function has to return the sum of the square of each number, this function is very easy.

Here is the code 

#include
#include
using namespace std;
int minimumThree(int x, int y, int z){
if(x cout << “El número menor es= “;
return x;
} else if(y cout << “El número menor es= “;
return y;
} else if(z cout << “El número menor es= “;
return z;
} else if(z==y and z std::cout << “Hay dos números menores ” << endl;
}
}
int sumSquares(int x, int y, int z) {
int suma;
suma = pow(x,2)+ pow(y,2)+ pow(y,2);
cout <<“La suma de los números al cuadrado= “;
return suma;
}
int main(){
int num1,num2,num3;
cout<< “Escribe número 1″<<endl; cin >> num1;
cout<< “Escribe número 2″<<endl; cin >> num2;
cout<< “Escribe número 1″<<endl; cin >> num3;
cout <<minimumThree(num1,num2,num3)<<endl;
cout <<sumSquares(num1,num2,num3)<<endl;
}