8 kyu
Find the Slope
3,489 of 10,799elexie
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
Similar Kata:
Stats:
Created | Jul 16, 2015 |
Published | Jul 17, 2015 |
Warriors Trained | 16381 |
Total Skips | 838 |
Total Code Submissions | 34429 |
Total Times Completed | 10799 |
Java Completions | 1864 |
C# Completions | 793 |
Python Completions | 3489 |
JavaScript Completions | 4063 |
Ruby Completions | 541 |
CoffeeScript Completions | 36 |
Clojure Completions | 360 |
Elixir Completions | 153 |
Total Stars | 129 |
% of votes with a positive feedback rating | 87% of 1471 |
Total "Very Satisfied" Votes | 1154 |
Total "Somewhat Satisfied" Votes | 239 |
Total "Not Satisfied" Votes | 78 |