Q16 Write a function to compute the distance between two points and use it to develop another function that will compute the area of the triangle whose vertices are A(x1, y1), B(x2, y2), and C(x3, y3). Use these functions to develop a function which returns a value 1 if the point (x, y) lines inside the triangle ABC, otherwise returns a value 0.

Program: 137 Write a function to compute the distance between two points and use it to develop another function that

Read more

Q10 Write a recursive function to obtain the first 25 numbers of a Fibonacci sequence. In a Fibonacci sequence the sum of two successive terms gives the third term. Following are the first few terms of the Fibonacci sequence: 1 1 2 3 5 8 12 21 34 55 89

Program: 131 Write a recursive function to obtain the first 25 numbers of a Fibonacci sequence. In a Fibonacci sequence

Read more