id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

Oct11_2019_P1SLHL_findSlope


Write a method that accepts two points in the form of two, two-dimensional arrays of double. Return the slope between those two points. Good news! None of the points will be directly above or below each other, so there will not be any vertical slopes.


Oct11_2019_P1SLHL_findSlope([10, 20], [30, 30]) → 0.5
Oct11_2019_P1SLHL_findSlope([50, 7], [55, 7]) → 0.0
Oct11_2019_P1SLHL_findSlope([8, 2], [9, 0]) → -2.0

...Save, Compile, Run (ctrl-enter)

public double Oct11_2019_P1SLHL_findSlope(double[] point1, double[] point2) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 320

Copyright Nick Parlante 2017 - privacy