8 kyu

Find the Slope

1,842 of 10,716elexie

Description:

Given an array of 4 integers
[a,b,c,d] representing two points (a, b) and (c, d), return a string representation of the slope of the line joining these two points.

For an undefined slope (division by 0), return undefined . Note that the "undefined" is case-sensitive.

   a:x1
   b:y1
   c:x2
   d:y2

Assume that [a,b,c,d] and the answer are all integers (no floating numbers!). Slope: https://en.wikipedia.org/wiki/Slope

Mathematics
Fundamentals
Algebra

More By Author:

Check out these other kata created by elexie

Stats:

CreatedJul 16, 2015
PublishedJul 17, 2015
Warriors Trained16264
Total Skips829
Total Code Submissions34072
Total Times Completed10716
Java Completions1842
C# Completions789
Python Completions3443
JavaScript Completions4047
Ruby Completions538
CoffeeScript Completions35
Clojure Completions359
Elixir Completions152
Total Stars128
% of votes with a positive feedback rating87% of 1465
Total "Very Satisfied" Votes1152
Total "Somewhat Satisfied" Votes238
Total "Not Satisfied" Votes75
Ad
Contributors
  • elexie Avatar
  • cris Avatar
  • g964 Avatar
  • GiacomoSorbi Avatar
  • eucki Avatar
  • ParanoidUser Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad