This quiz was another level. I found it difficult because of the Fibonacci series, but at the end I tamed the beast.
In this quiz we had to :
-
Write a function called distance(x1, y1, x2, y2) which receives four numbers whichrepresent two points in the cartesian plane. The function should return the distancebetween the two points (x1,y1) and (x2,y2). Remember that the square of thehypotenuse of a right angle triangle is equal to the sum of the squares of the two other sides.
-
Write a function called fibonacci which receives a single parameter “n” (a non-negative integer) and returns the nth number in the fibonacci series which is:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89…………So, fibonacci(0) would return 0.fibonacci(5) would return 5fibonacci(8) would return 21.Note that the first two fibonacci numbers are 0 and 1.All others are the sum of the previous two fibonacci numbers.
(Credits goes to http://9gag.com/gag/1288910)
This was me with the Fibonacci program, beacuase in my other course I used to have a lot of problems, but at the end I tamed the beast. 🐯
The link to meet the beast 👉 https://github.com/mfcanov/Quiz-3.git