Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slope Finder
#1
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
Reply


Messages In This Thread
Slope Finder - by nevets04 - 10-15-2009, 03:13 PM
RE: Slope Finder - by Viciousness - 10-15-2009, 03:16 PM
RE: Slope Finder - by nevets04 - 10-15-2009, 03:19 PM
RE: Slope Finder - by Jamza - 10-15-2009, 04:08 PM
RE: Slope Finder - by Viciousness - 10-15-2009, 04:16 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)