Hi, its a really simple script, but since I'm new to python I have no clue what I am doing wrong. Also if you could, I would appreciate tips on a good IDE for python.
Thanks Andy
Code:
#!/usr/local/bin/python
x1 = raw_input("What is x1 ")
x2 = raw_input("What is x2 ")
y1 = raw_input("What is y1 ")
y2 = raw_input("What is y2 ")
def main():
choice = raw_input("What type of question are you doing?" ;
" /n Midpoint = M, Gradient = G and Sides = S")
print x1
print x2
print y1
print y2
if choice = "M":
print "(x1 + x2)/2, (y1 + y2)"
elif choice = "G":
print "(y1 - y2)/(x1 - x2)"
elif choice = "S":
print "((x1 - y1)**2 + (x2 - y2)**2)**1/2)"
else:
print"Sorry, your input was not recognised,";
print "make sure to use /n capital letters"
return 0;
Comment