| 1 | initial version |
After 5 questions, 4 answers and 43 point of karma, you are assumed to become autonomous with syntax errors ;)
If i put your code in a Sage session i get:
File "<ipython-input-7-54c6265f464d>", line 19
for j lista_xy:
^
SyntaxError: invalid syntax
So, it means that your loop is not well defined, you should replace it by:
for j in lista_xy:
If i do this again, i got:
File "<ipython-input-9-bf0cc464ad8d>", line 26
lineas.append(j,(x2,y2)]))
^
SyntaxError: invalid syntax
Which is the problem @calc314 mentionned. As the name lineas suggests, you seem to build a list of lines, i guess that you meant:
lineas.append(line([j,(x2,y2)]))
Then your program seems to work. At least there are no syntax errors left, hence you can try to see whether the output looks like what you are looking for.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.