Back to Freecodecamp

Slope

curriculum/challenges/english/blocks/learn-linear-functions/6331d291b51aeedd1a2bd651.md

latest625 B
Original Source

--description--

This first video will focus on the slope of a line and how to calculate it.

Here is the <a href="https://colab.research.google.com/drive/1UJ1w-XFTuCfK6FI3H2GT0lbxd2HO3tQ6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this and the next videos.</a>

--questions--

--text--

If you have already defined these variables, which of the following is the correct slope formula?

--answers--

slope = (x1 - x2) / (y1 - y2)


slope = (x2 - x1) / (y2 - y1)


slope = (x1 - y1) / (x2 - y2)


slope = (y2 - y1) / (x2 - x1)

--video-solution--

4