Quiz 3

This program use a function to called distance(x1, y1, x2, y2) which receives four numbers which represent two points in the cartesian plane. The function should return the distance between the two points (x1,y1) and (x2,y2). Remember that the square of the hypoten.

quiz3-1

This program use a function to 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 5 fibonacci(8) would return 21.

fib

CC BY-SA 4.0 Quiz 3 by ferespib is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.