User:Mihail Bakalov/Trimester 1/NETWORK BASED PROTOTYPING/AstralDataProject
<script python>
import csv import turtle t = [] r = csv.DictReader(open("asas.csv")) counter=0 f = [] for row in r:
if row.get("Class") == "Mira":
t.append(int(float(row.get("DEC"))))
print t[0]
d = t[counter]-t[counter-1]
g = t[counter]
gg = t[counter-1]
for value in t:
if counter == 0:
if g > 0 and g < gg and d > 0:
turtle.fd(10)
turtle.rt(t[counter])
elif g > 0 and g < gg and d < 0:
turtle.fd(10)
turtle.lt(t[counter])
elif g > 0 and g > gg:
turtle.fd(10)
turtle.lt(t[counter])
elif g < 0 and g > gg:
turtle.fd(10)
turtle.rt(t[counter])
else:
turtle.fd(10)
turtle.rt(t[counter])
#turtle.fd(10) #turtle.lt(t[counter]) else: if g > 0 and g < gg and d > 0: turtle.fd(10) turtle.lt(t[counter]) elif g > 0 and g < gg and d < 0: turtle.fd(10) turtle.rt(t[counter]) elif g > 0 and g > gg: turtle.fd(10) turtle.lt(t[counter]) elif g < 0 and g > gg: turtle.rd(10) turtle.lt(t[counter]) else: turtle.fd(10) turtle.lt(t[counter])
counter+=1
</script>