To find the slope of a line that passes through the points (0,0) and (2,4), you need to find the rise over run, or the change in y over the change in x. To do this, you need to take both the y values and subtract one from the other, so in this case, subtract 4 from 0. This is your change in y, also known as the rise of your slope. Next you do the same for your x values, in this case you would subtract 2 from 0. This becomes your change in x, also known as the run of your slope. ( I included step by step equations below)
Slope = [tex]\frac{y2-y1}{x2-x1}[/tex] = [tex]\frac{0-4}{0-2}[/tex] = [tex]\frac{-4}{-2}[/tex]
When you simplify your answer you get a slope of 2.
Hope this helps!