Finished Project

--Originally published at TC1017

My friend Luis and I finished this Tuesday our project which we are very proud of. Our project is a game programmed in c that will play a song from our list of song and the user will have to guess which song it is. The computer will give the user 4 options and he has to type the option that he thinks is correct. The more correct answers he has the more points he will achieve.

We had some complications in the making but Ken always had out back. First thing we didnt know was how to install the mp3 library into c++ that would play the mp3 from our computer so Ken did that for us.

Then after lots of arrays loops and going to Ken´s office we came up with our 266 line program that worked like this:

Mostrando IMG_1580.JPG

 

We are very proud of our project and believe we can keep adding songs and features to make ir a more complete game!


Calculating e

--Originally published at TC1017

This #wsq12 consisted in calculating the eulers constant and print the number with the precision that the user wants. In order to do this program I saw other student posts and saw the function “setprecision” which made the rest pretty easy. The program is below.

euler.pngeuler1.png


Babylonian Method WSQ10

--Originally published at TC1017

In this #wsq10 we were asked to do a function that executed the babylonian method in order to know to squared root of a number. I serached on the internet how it worked and got some ideas on other students posts on how to do it. The link below helped me a lot because it explained it step by step in an easy way.

 

babi.pngbabi1.png

https://www.deltacollege.edu/dept/basicmath/Babylonian.htm


MP3 Encoding Project

--Originally published at TC1017

En estas últimas semanas me junté con mi amigo Luis Plancarte y pensamos en ideas para un proyecto de programación, al final pensamos que una buena idea sería crear un juego en el cual la computadora va a poner una canción (en formato mp3) y el usuario va a tener opciones de canciones y va a tener que adivinar cual de todas es la que está sonando, el programa también medirá el tiempo que se tomó en adivinar la canción y los aciertos que tuvo.

Por el momento solo hemos investigado como hacer que el programa ponga una canción desde sus archivos y hemos descargado las librerías necesarias, sin embargo no las hemos instalado ni las hemos puesto a prueba todavía. Una vez que tengamos esto hecho todo lo demás será programación y mucha falla y error.


Quiz 08

--Originally published at TC1017

The quiz from week 8 consisted in creating a program that returned the value typed by the user of the fibonacci series. Ken gave us a very clear explanation of how the series worked and it was pretty easy to deduce how the program would work. I spent half of the class debugging the code and making sure the values were correct. The code is below.

 

quiz8.pngquiz81.png


Quiz 06

--Originally published at TC1017

Exercise 1:

Consisted in fixing a c program into c++, I copy pasted a programming suggestion by Ken into the program and used

quiz61.pngquiz611.png

Exercise 2:

Consisted in createing a program which changed the type of value of 3 different variables, the was a char, an int, and a float. There is a function for every value type to change any variable into that value type, so that is what i did. The program is below.

quiz62.pngquiz622.png

Exercise 3:

Consisted in printing out a pattern of letters in a pyramid form. I just ordered multiple couts to print the correct structure. The program is below.

quiz633.pngquiz63.png

Exercise 4:

Consisted in reading 3 numbers and ordering them in ascending order, I just functions min and max to know the mallest and biggest number respectively, and used a series of ifs to know the middle one. The program is below.

quiz644.pngquiz6444.pngquiz64.png

Exercise 5:

Consisted in creating a program that tells if a year is a leap year, the is a series of rules in order to validate the request, I used ifs to adjust those rules and print the outcome. The program is below.quiz65.pngquiz655.png