Support Forums
Slope Finder - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Python Programming Language (https://www.supportforums.net/forumdisplay.php?fid=32)
+---- Thread: Slope Finder (/showthread.php?tid=1577)



Slope Finder - nevets04 - 10-15-2009

I just put this together quickly for homework for my algerbra 1 class.
I had about 54 problems that I had to do something like find he slope for a line that goes through (4,2) and (3,2)
This program easily solves that prblem, i finished my homework in a couple of minutes Big Grin
Code:
import os
os.system("clear")
while True:
    print "--------------------------------------------------"
    print "        Slope Finder             "
    print "--------------------------------------------------"
    a = 0
    b = 0
    c = 0
    d = c
    a = input("First x: ")
    b = input("First y: ")
    c = input("Second x: ")
    d = input("Second y: ")
    print d - b,"/",c - a



RE: Slope Finder - Viciousness - 10-15-2009

Lol was "(y1-y2/x1-x2)" that hard?

Good program I guess. :p


RE: Slope Finder - nevets04 - 10-15-2009

(10-15-2009, 03:16 PM)MreGSX Wrote: Lol was "(y1-y2/x1-x2)" that hard?

Good program I guess. :p

I have trouble storing more than 1 number in my head Big Grin


RE: Slope Finder - Jamza - 10-15-2009

(10-15-2009, 03:19 PM)nevets04 Wrote: I have trouble storing more than 1 number in my head Big Grin

Vertical
Horizontal

?


RE: Slope Finder - Viciousness - 10-15-2009

(10-15-2009, 04:08 PM)Jamza Wrote: Vertical
Horizontal

?

(1,-5) (-4,9)

You're not looking at a coordinate plane.