Reflexión final

“Hello World”. Con eso empezó todo, un curso más y diferente, con la aplicación de un nuevo método de aprendizaje que sin duda me ayudó a aprender de una manera diferente, a través del “Flipped Learning”. Mi curso de Solución de Problemas de Programación con el profesor Ken Bauer me ha dejado muchas cosas buenas, como el aprendizaje en equipo, la responsabilidad, el expresar mis dudas cada vez que existan, el uso de las redes sociales como método de aprendizaje y de cultura estudiantil.

Personalmente me gustó mucho la manera de evaluar, la flexibilidad que a veces nos hacía un poco mas ociosos pero que a final de cuentas siempre debíamos entregar todo en tiempo y forma. Considero que la poca importancia que se le da a las faltas nos ayuda a distribuir mejor nuestro tiempo (obviamente nunca siendo irresponsable y faltando por causas innecesarias), preparándonos para una vida profesional, donde tu eres responsable completamente de lo que haces. Que el profesor nos diera los temas y hacer un blog post del mismo, me sirvió para aprender a buscar información, a recurrir a ayuda de otras personas y a trabajar en equipo, lo que me demostró la importancia del internet y que siempre podemos recurrir a otras personas para terminar nuestros trabajos y cumplir nuestras metas.

Este curso me ayudó a aprender nuevos métodos para programar, usando C++ y una terminal, creando funciones, usando vectores, loops, entre otros, que espero sigan siendo útiles a lo largo de mi carrera porque en lo personal me gusta mucho la programación. Además, la creación de mi blog creo que es algo que personalmente me gustó más que todo lo demás, ya que estoy haciendo que mis trabajos sean útiles para otras personas, expandiendo hasta dónde puede llegar lo que hago y que los

Continue reading “Reflexión final”

Proyecto Final: Calculadora de Derivadas e Integrales.

Hola a todos!

Este post es sobre mi proyecto final de programación en C++, para lo cual mi equipo y yo decidimos crear una calculadora que pueda resolver integrales y derivadas que el usuario elija. Dicho lo anterior, buscamos la creación de un programa que fuera útil para nosotros y para las personas que quieran utilizarlo, creando el programa con fines prácticos para los estudiantes y sin duda alguna muy amigable y fácil de entender para el usuario. Para ello necesitamos aplicar los conocimientos adquiridos a lo largo del curso, a través del uso de funciones, vectores, librerías, entre otros.

Durante la creación de este proyecto nos enfrentamos a muchísimos problemas, ya que necesitamos crear tres diversos programas para la función del original (INTMAIN), donde pedimos todos los valores al usuario para su uso. Cabe destacar que usamos el software de VISUAL STUDIO 2012 para la creación de nuestro programa, ya que consideramos que aquí era más fácil la aplicación a consola.

Primero que nada, aprendimos a crear una librería, la cual definimos como Elementos.h; a continuación les muestro una imagen de esta librería, donde definimos variables, otras librerías necesarias para que la de nosotros funcionará y más.

1

Después, debimos crear un source.cpp; dentro del cual definimos algunas otras funciones necesarias para que el INTMAIN funcionará, llamando a la librería que creamos, a continuación una imagen del mismo.

2

Finalmente tenemos la creación de nuestro INTMAIN, donde recurrimos a llamar la librería creada, y en donde a través de dos CASES preguntamos al usuario si quiere ya sea derivar o integrar, preguntado además valores necesarios, como exponentes, la cantidad de cifras que tiene su integral o derivada, entre otros.

Imágenes de nuestro main:

3
4
5
6
7

 

Me gustaría añadir que estamos presentado algunos problemas para hacer que nuestro programa funcione, porque

Continue reading “Proyecto Final: Calculadora de Derivadas e Integrales.”

SciLab.

Hello people! This is the last post about WSQ’s for my programming class and I’m sad but happy to have finished all of them. This post is about SCILAB, a platform that is widely used in secondary and higher education institutions for teaching mathematics, engineering sciences and automatic control engineering.

GET SCILAB FOR FREE: http://www.scilab.org/download/latest

In this platform, we can make basic mathematic operations and you can mix them defining values and variables:

Sin título.png

Another thing is that you can make complex operations with trigonometric functions, like this :

Sin título2

Also, you can define vectors and matrixes:

VECTORS:

Sin título3

MATRIX:

Sin título4

Another tool is that you can apply your knowledge making functions and make them run, like this :D:

Sin título5

In conclusion, Scilab is a cool program that help us to resolve math problems using programming, so is good to know how to use it.

Learn something new and start to use SCILAB =).

Regards, EdMo.

Quiz 7

last-chance.jpg

Heeeeeellooooo people. And here I am, posting about the last quiz of this semester. I have to accept that I’m not a lover of the quizes buttt, they made me practice and learn a lot. In this quiz we had to make a program that calculates the dot product (or scalar product of vectors) for the numbers that the user choose.

First of all, What is the dot product?

A little explanation:

Scalar Product of Vectors

The scalar product and the vector product are the two ways of multiplying vectors which see the most application in physics and astronomy. The scalar product of two vectors can be constructed by taking the component of one vector in the direction of the other and multiplying it times the magnitude of the other vector. This can be expressed in the form:

If the vectors are expressed in terms of unit vectors i, j, and k along the x, y, and z directions, the scalar product can also be expressed in the form:

The scalar product is also called the “inner product” or the “dot product” in some mathematics texts.

 

So, we have to create two lists and the dot product has to multiply the N number of one list to the N number of the second list. It has to look like that:

LIST 1                              LIST 2

1                    x                       6                    =6
3                    x                       8              

3QR
323

Continue reading “Quiz 7”

#WSQ13, Partial 2 Exam

exam.jpg

Hello people! I’m back to post about the WSQ13, wich is about our Partial Exam. We made a practical programming exam that contained four programs to solve and in this WSQ we had to answer the programs correctly. So, here my solutions for them:

The first one was about the Fibonacci Numbers (we saw how to make it before), so I don’t have problem to make it. Here the screenshots of the program:

fibow

fibg

The second one consisted in make a program which calculates the operation a^b. As the first program, we made it before. Here, the screenshots:

spopppspppppo

In the third program, we have to make one program which make a Triangle asking to the user for the number of letters that he wants to conform the triangle. For example, if the user puts a 3, the triangles looks like –> t
tt
ttt
tt
t

And to get it, I used a for loop to add one T when it was lower than the number of the user, and to subtract one T if it was bigger than the user’s number.
The screenshots:

triantria

And finally the last program was about something that we made in the WSQ 11, Yo soy 196, but now we had to use Bools. I found it difficult because I’ve never used Bools but as we all known, internet is God and I found a lot of information about it, here some links to be smarter: (http://www.zator.com/Cpp/E3_2_1b.htm) & (http://www.cplusplus.com/forum/beginner/124090/)

**I had to thank to my friend Sergio Zavaleta who helped me making the program useful using lowercase and capital letters.

Here the screenshots:

boolpalt

And don’t forget to check my codes on GitHub.

1st Program: https://github.com/eduardomrlsg/TC101/blob/master/FiboEx

2nd Program: https://github.com/eduardomrlsg/TC101/blob/master/SPPEx

3rd Program: https://github.com/eduardomrlsg/TC101/blob/master/Trianglex

4th Program: https://github.com/eduardomrlsg/TC101/blob/master/PalEx

 

Regards. EdMo.

 

WSQ12, thanks Internet.

keep-calm-try-again

Helloooooo, I’m here to write about the last WSQ of the partial, and yeah, It gave me big troubles. Actually, I can’t make it work, but I got the logic and the explanation of what it has to do, so I still working on it. I search on the Internet and I saw some blogposts and other pages to get the result but it didn’t work.

The WSQ12 consists in make a program create that asks the user for a word which will be your search word and the name of a file to open and search for that word. Then create a function that will receive two parameters (both string) representing those two data points. This function returns the number of occurrences of that word in that file.

Well, I think that maybe I got the wrong libraries or something in my code is wrong but, this is what I have.

wsq12

 

Check the code and help me to fix it😀

https://github.com/eduardomrlsg/TC101/blob/master/WSQ12%20WordCount

Regards, EdMo.

WSQ11, Lovely 196, not.

maxresdefault

Hello people. I am here to post about the new program that I made and that takes me 10000000000 hours of headache. I was lost making this program, until I decided to ask for help to the dream team: Darío, Baruquismen and Batmantec and also my teacher Ken, who tolds me that I had to start with a diagram to understand better the logic of the program.

And well, for this program we have to create a program that asks the user for two pieces of data:

  • The lower bound of the sequence
  • The upper bound of the sequence
Then you check the values from the lower bound (inclusive) to the upper bound (inclusive) and make a report of them. During the analysis of each number, if a Lychrel number is found it should be reported immediately with something like “Found a Lychrel number: 196”
The report must show:
  • The range of numbers analysed (lower to upper bound)
  • The number of natural palindromes (no addition to inverse needed)
  • The number of non-Lycherels encountered (become palindromes)
  • The number of Lycherel number candidates (that did not converge to palindrome

To make that I use a function called REVERSE to get the palindrome, and then, using conditionals (IF) I sent the result to Lychrel, NonLychrel or Palindrome.

And that is my code:

c19
c192

On terminal:

g19

Thanks to Batmantec, Baruquismen, Darío and Alberto (Cerritos sucks).

Check my GitHub or one of the people that I mentioned before.

https://github.com/eduardomrlsg/TC101/blob/master/WSQ11%20196

Regards, EdMo.

 

 

Quiz 6

Cout<<“Hello People”<<endl.

Hello again, now I’m posting about my quiz 6 of the course. On this time, we have to create a program who can give the great common denominator between two numbers that the user enter into the program, here the instructions:

The function should receive two integers and return an integer.Obviously you should test your function, so create a main program that asks the user for two values, calculates the gcd and displays that.

It wasn’t too difficult, because we just need an if conditional and a while loop to make the cicle and find the greatest common denominator between the two numbers, and here, the code:

q6.png

And the program on terminal running:

g6

Don’t forget to look my codes on github so you can use it and learn how to make it, also you can add comments !!

https://github.com/eduardomrlsg/TC101/blob/master/Quiz6

Regards. EdMo.

 

QUIZ 5

42c150433839bad235f1f83925cf3875527c7bb3-vector-storefront_189303863

Hello people.

I am here to post about the quiz that I made some days ago about two programs: One which has to:

  1. Create a function called is_palindrome which receives a string as a parameter and returns true if that string is a palindrome, false otherwise. Remember that a palindrome is a word that is the same forward or backward. For full points your function must ignore case and must work with any character (not just letters). So (“Dad$dad” is a palindrome even though the D is capital and d is lower case).

On this program I learned how to use vectors and make a palindrom with it, taking the word and then taking the reverse of the word, Yeah, vectors rules.

To learn more about vectors on C:  http://www.cplusplus.com/reference/vector/vector/

Here my code:

q5

Running:

palg

And the second one:

  1. Create a function called find_threes that receives as a parameter a list (or Vector or array for C++ students) of numbers and returns the sum of all numbers in that list that are evenly divisible by 3. Note if using vectors, you will need an additional parameter to represent the number of numbers in the array. So if the list was [0,4,2,6,9,8,3,12], the function would return 30 (0+6+9+3+12)

Here, we have to use an array to get the range of numbers that we are going to use in our function “threes”. It was a little bit difficult but with the help of other students of the class I can make it.

The code:

3

And running:

g3

To more information check all my codes on github and dont forget to make questions or add comments to stay in contact with me;D

https://github.com/eduardomrlsg/TC101/blob/master/Quiz5Palindrome

https://github.com/eduardomrlsg/TC101/blob/master/Quiz5Threes

Regards, EdMo.

WSQ10 Lists

Hello again to all my friends!

As you can see, I was busy for a looooong time but here I am posting the homework about lists, a program that will calculate the average, the addition and the standard deviation between the numbers that you want. On this program, the instructions were:

**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.

To got it, you have to use arrays to get the 10 numbers and then you have to put it inside your function. Also I learned a new command, the SETPRECISION one, who is to choose the number of decimals that you want in your answer. To more details, check my code:

list1
list2
list3

To get more information about the set presicion command, check this link: http://www.cplusplus.com/reference/iomanip/setprecision/

And the program running:

listr

And yeeeeeey, it compiles and works😀

Don’t forget to see my enter codes on github:

https://github.com/eduardomrlsg/TC101/blob/master/WSQ10%20LISTS

Regards, EdMo.