السلام عليكم
كل عام وانتم بخير
عندي كم سؤال وأريد حـل ألهم لانه عندي اختباار ياليت تساعدووني وجزاكم الله الف خير
Write a test for this function.
ضرووري عندي اختبار يوم الاحد
كل عام وانتم بخير
عندي كم سؤال وأريد حـل ألهم لانه عندي اختباار ياليت تساعدووني وجزاكم الله الف خير
1. Write a function that calculates the square root of a double without using the
cmath
library function
sqrt(). The function takes one double and returns its square root.
Assume that the value you want to calculate its square root is between 1 and 100
inclusively. Write a test for this function.
2. Write a function that generates three random values and returns whether they can
represents triangle sides or not. The function generates the three values and returns it
to the caller. Moreover. Its return type is boolean. It must return true if the three values
can represent triangle sides. Otherwise it returns false. Write a test function for this
function.
3. Write a function that calculates the following equation:
f(x) =
1
if x = 0,1
Assume that the value you want to calculate its square root is between 1 and 100
inclusively. Write a test for this function.
2. Write a function that generates three random values and returns whether they can
represents triangle sides or not. The function generates the three values and returns it
to the caller. Moreover. Its return type is boolean. It must return true if the three values
can represent triangle sides. Otherwise it returns false. Write a test function for this
function.
3. Write a function that calculates the following equation:
f(x) =
1
if x = 0,1
√
f(x-1) + √ f(x-2)
if x > 1
Undefined
if x < 0
Write two versions of the function:
3.1. Recursive Version.
3.2. Iterative Version.
if x > 1
Undefined
if x < 0
Write two versions of the function:
3.1. Recursive Version.
3.2. Iterative Version.
Write a test for this function.
ضرووري عندي اختبار يوم الاحد