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:

More By Author:

Check out these other kata created by elexie

Stats:

CreatedJul 16, 2015
PublishedJul 17, 2015
Warriors Trained16381
Total Skips838
Total Code Submissions34429
Total Times Completed10799
Java Completions1864
C# Completions793
Python Completions3489
JavaScript Completions4063
Ruby Completions541
CoffeeScript Completions36
Clojure Completions360
Elixir Completions153
Total Stars129
% of votes with a positive feedback rating87% of 1471
Total "Very Satisfied" Votes1154
Total "Somewhat Satisfied" Votes239
Total "Not Satisfied" Votes78
Ad
Contributors
  • elexie Avatar
  • cris Avatar
  • g964 Avatar
  • GiacomoSorbi Avatar
  • eucki Avatar
  • ParanoidUser Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad