Project!

We had our last class today, great course(I´ll upload my course review later).

Time to show yall our Project(Saul, Alex and I).

3.9m ohm resistor.jpg
Click on it to get the code


Description: 

Our program is basically a resistance calculator, in which you type the color of your resistance and it´ll give you the value of it in Ohms and its tolerance. Giving you even the option to change the units to KiloOhms or MegaOhms.

Sin título.png
Quick view of the program

For showing the list of colors we made an external text file. (colores.txt)[click on it to get it] and don´t forget to put it in the same folder in Cygwin.

For the 4 bands, this will help you understand how resistances work.

color_code_table.jpg

So instead of using like 837373 conditionals, we reviewed our C# courses, in whice we used the cases, better known as “Swich”, so we made a swich for each band.

We write the operations to get the value of the resistance and the tolerance(just multiplications and divisions) and we add some conditionals to change the units in order to fullfit the user requirements.

Feedback

Working on this project was kinda easy, we used an external file to see the values of the numbers, we used loops, cases and we also added a new feature, COLOR.

To add color to your code here you have a link Ken shared with me, there are just like 8 colors but it still helps.

COLOR[link]

Easy to work with friends, to have more time for our other projects we made this one like 2-3 weeks ago.

Good luck again in finals.

Like always, a nice song:

 

 

#WSQ14 Scilab

Thanks to Julio Carvajal for the spanish manual of SciLab(made it easier to understand) I´ve already read the manual so I more or less understand SciLab and it´s benefits.

I´ve also found some itneresent videos that might help you out to understand it(in case you don´t wanna read the 30 pg manual).

scilab_logo.gif
Click on the logo to see the video

I´m working on some exercises to practice with it, if I have them before we finish the course I´ll post it here.

Good luck in all your final exams fellas, I leave you here a nice song you can heard if you don´t have nothing interesting to do:

#WSQ13 Exam2: T, T and T.

tumblr_md6pv4bkqk1rhnyg2o1_500.jpeg

[Click on Saul´s grandma´s image to listen a great song while you´re checking my post]

I know yall wondering how to do the first program of the exam soooo I got you the answer fellas, my code could be easier I think so I´ll be updating this post and adding it the other programs.

Well here´s the T code(click on an image, CHOOSE WISELY, one will go to GitHub and the other one to the DonaldTrump fan page, so be careful):

tttt.png          donald-trump-funny-look-alike-thumb.jpg

Dedico este post al MAGO Miguel.

#WSQ12 Word appearances

It took me way to much time to get this WSQ right, it´s still very confusing the changes between one language and another and even also between iOS, Linux and Windows.

First of all I definitely invite you all to check Orlando´s blog, thanks to his post I get my code right. Here´s Orlando´s blog. He´s the only one who made the counter way better by counting the word in a whole string line, not just reading one by line(I had my program working like this but I realized its not very functional to only read a word and skip the rest of the line. So Alex I think you should fix yours)

Important thing if you´re thinking in just copy Orlando´s code, it will only work if you have a Mac, why? Because windows need an important thing you can read here “Why I cannot just copy others codes :(? 

Here´s a small caption of how you must write the “c_str()” in your code:

line.png

Its essential to have your text file in the same folder as your program. I won´t say more here´my code will be bellow just click on RICK ASTLEY and you will end up on my GitHub.

12969426_10209238510464892_396541936_n.jpg

PROJECT

Newsss about the project, as you know I´m working with Saul and Alex on a resistance calculator in which the user types the colors of the lines of the resistance and we will return him the value of it, the tolerance and also the option to change the units between ohms, kiloohms and megaohms. We almost done everything, we´re working on a few details and when we get it we will post it on the IMT facebook page so you all can use it.:)

join-the-resistance.jpg07e6c70ab8d4eb6ab8c0f0b4dadee69aba2cd7a3.gif

 

 

 

 

 

 

Have a great weekend everybody!

#QUIZ06 Euclidian Algorithm

One week later is way better than never, instructions of the Quiz are here.

Summing the instructions we should create a code which receives two numbers or parameters from the user, then in a function print the biggest denominator that divides both numbers.

10330240_1045265532201362_6669094908167145769_n.jpg Clic on the amazed monkey for more information about the Euclidian Algorithm

                           [CODE on cygwin]

Once you understand the logic of the problem, its pretty easy to solve, you will only need a 4 lines function + the main part of the code.

jenfjejeAs you can see you only need to link two values to the function whose are the first and second value that the user typed.

Sin knceejdf.png

Here is the proccess using the two numbers of the Ken example´s page. 270 & 192.

Its was a good challenge, to improve our knowledge, I didn´t know what a Euclidian Algorithm was so it was interesting, and I think useful.

As Always, Random Stuff at the end[+Great song]

Yall love science(or Im just guessing) and for the same reason you´ll love this video

And a lovely song, of Alt J, Enjoy! And have a great holiday!

#QUIZ05 Palindrome & 3Divisibles

Sorry for posting Quiz05 until now but i totally had my mind in the Lychrel numbers(now on my blog if you want to check it) .

tumblr_o3nm7uOO7v1tiyj7vo1_500.jpg

Quiz05, first thing to do is something related to the Lychrel, check if a word(string) its a palindrome or if its now, creating a bool function for it and printing the result.

Some new stuff on the code, like using .size and .rend, not to hard to understand them but here´s more information. There´re different ways to get the inverse of a string, the one I´ve done in the code is the easier to do in my opinion. (If you find an easier one let me know)

Palindrome:[CODE]

palin.png

As you can see we´re working with a boolean expression ´cause we only need to verify if its a palindrome or its not. Instead of doing it as a bool try using int and give a 1 if ifs a palindrome or 0 if its not, both methods work perfectly.  Quick doubt-solving page for you who don´t know what´s r.begin and .rend.

And here the main part of the code:

main.png

Just make a condition for the boolean expression and thats all.

3Divisibles:[CODE]

In this case, you have to create an array which contains a whole bunch of numbers that the user types and add only the ones which are divisibles by 3. Example: Range(5,3,10,6,2) from this range it only add the 3 and the 6. So it prints the total of the addition as a 9.

In my case, before giving the array a value, I ask the user for the numbers of values he will type, and thats the capacity of the array.

3div.png

And just like the #WSQ10 you create a for loop to ask for all the values.

total

Easy to understand, I

Sin título.png

Continue reading “#QUIZ05 Palindrome & 3Divisibles”

#WSQ11 #NadieQuiereSer196

One freaking week breaking my head and having brainstorm ideas to figure out how to write this satanic code(Not even Satan would create something like this) thank God Aguayo for gave me the patience to not freak out and finally finish the code.

As usual here´s the code(yeah i know you´re just coming to my blog for it) click on the random image to go to GitHub[The code won´t work until you install the BigInteger and do all the proccess Ken explains in this VIDEO] and don´t forget to thank Aguayo for his greatness

12800132_10208894747391030_7422022885247348938_n.jpg

I´ve also made a video explaining the code working and its structure so there isn´t any screenshot this time, here it is:

Like always, here some random Tumblr picture again

 

 

#QUIZ04 Euler didn´t have a girlfriend right?

Finallyyyy Euler, we know u r dead but meeeen why u did this to us? tought we were friends buddy.

Euler didn´t have a real hobbie like playing soccer, go to some ancient clubs and drink absenta with his friends(in case he had any) he used to be in his room, wondering how he could make our existence a little bit harder, you had one job Euler.

My first reaction when i saw the quiz was like: Damnnn Euler you ain´t my brotha anymore, you playin´

200_s.gif

 

Well click on the image above to get my code on GitHub.

This time i won´t make a video ´cause I´m preparing myself for the #YoSoy196 WSQ, winter´s coming so I´ll need to be ready.

Ken helped us in class, my trouble was that i didn´t know how to dictate the parameters for the factorial to indicate it when it must stop.

The Euler formula is pretty easy(but he didn´t use it lol):

f1

EXTRA STUFF

We were considering (AlexFoo, SaulTorres and I) to do a minigame for the project but we think it´s better to start doing some mecathronics stuff like using sensors and everything, we´ll see.

Check out this song, deep lyrics deep meaning

See yall, try to not die.