playing-with-numbers-node icon indicating copy to clipboard operation
playing-with-numbers-node copied to clipboard

Add triplets endpoint

Open agent515 opened this issue 5 years ago • 0 comments
trafficstars

Please describe the feature you want this project to offer The endpoint /triplets which will tell, if the given sides form a right-angled triangle.

Describe the solution you'd like

  1. Check all sides are non-zero positive integer
  2. Check if sides form a valid triangle
  3. Check if sides form a right-angled triangle using Pythagoras theorem

Additional context (Optional) Also, add tests for the same.

  1. form a right-angled triangle (200)
  2. do not form a right-angled triangle (200)
  3. do not form a triangle (200)
  4. bad credentials (400)

agent515 avatar Oct 06 '20 19:10 agent515