So this was the Quiz #3, and here you can see what I was supposed to do. First, create a program that calculate the distance between two points given by the user, in the cartesian plane. And the second one, was to create a program that could show you the fibonacci series of a number that was given.
For the first problem, you had to calculate the middle point of the two values for “x” and for “y”, then you had to apply the Pythagorean theorem in order to calculate the distance. As you can see for the value of “x” I used a variable called “a” and for the “y” value I used a variable called “b”. After you had the difference between those values (x2-x1 and y2-y1) you must use the Pythagorean theorem and that’s it. Then you had to call the distance function into the main function.
Here you can have a look of this code on GitHub.
For the second program, I worked with my friend Dario. (check out his blog HERE, he has an awesome blog). We tried to understand first the Fibonacci series and then we had to apply it to the code. We spent the rest of the class trying so many ways that we ended up stressed and pissed off with the whole world hahaha. After a few hours I gave it a second chance to this program and I searched for any information that could help me with this problem. I found this article that gave an idea of the structure of the program.
Here you can have a look of this code on GitHub.
And when the second program finally worked, I was like… #youknowthatfeel
Thanks for reading! Peace…
Alex H.