You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Explanation: The fraction -4/7 is a proper fraction because the absolute value of the numerator (4) is less than the denominator (7). The function should return true.
51
57
constnegativeFraction=isProperFraction(-4,7);
58
+
assertEquals(negativeFraction,true);
52
59
// ====> complete with your assertion
53
60
54
61
// Equal Numerator and Denominator check:
55
62
// Input: numerator = 3, denominator = 3
56
63
// target output: false
57
64
// Explanation: The fraction 3/3 is not a proper fraction because the numerator is equal to the denominator. The function should return false.
58
65
constequalFraction=isProperFraction(3,3);
66
+
assertEquals(equalFraction,false);
59
67
// ====> complete with your assertion
60
68
61
69
// Stretch:
62
70
// What other scenarios could you test for?
71
+
// Zero Numerator check:
72
+
// Input: numerator = 0, denominator = 5
73
+
// target output: true
74
+
// Explanation: The fraction 0/5 is a proper fraction because the numerator (0) is less than the denominator (5). The function should return true.
0 commit comments