Hi, firstly i'm gonna be honest and say that this is homework for my programming class, but the teacher doesn't have a problem with us using the internet to get help aslong as we dont blatantly steal code.
The problem is to take a text file containing for example the following:
position 50 10
line 50 0
line 0 50
line -50 0
line 0 -50
and interpret these into python drawing commands (this case would be a square).
I'm totally stuck with what to do here to write this program, all i've got at the moment is a little code to actually read the text file:
f = open("test1.txt","r")
for line in f:
print line,
line = line.strip()
data = split(line, " ")
but i've got no idea at all where to go from here. Obviously i'm not asking for a complete solution, but a point in the right direction would be much appreciated. Thanks.