> The second number should be negative ( I WANT it to be negative). For example: > > print (0 - t[4])*(t[3] - t[5]) , (0 - t[5])*(t[2] - t[4]) gives : > > -30895 -935636 > > And in the python shell: > > >>> -30895 -935636 > -966531
No, because you have to *subtract* the second answer from the first ( according to your print statement: print (0 - t[4])*(t[3] - t[5]) - (0 - t[5])*(t[2] - t[4]) ). So: >>> -30895 - -935636 904741 If you want it to be negative, check the order of your coordinates: maybe you need to interchange two variables between one set of parentheses. Or maybe you need to subtract absolute values instead (sorry, too lazy to do the math to find out what is correct). _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor