I'm trying to run this turtle function:
from turtle import *
def main():
color('red', 'yellow')
begin_fill()
while True:
forward(200)
left(170)
if abs(pos()) < 1:
break
end_fill()
done()
main()
But I keep getting this error:
Traceback (most recent call last):
File "C:\Users\eardery\Desktop\Final Exam Practice\turtlepolygon.py", line 1, in <module>
from turtle import *
File "C:\Users\eardery\Desktop\Final Exam Practice\turtle.py", line 234
raise Error, "no color arguments"
^
SyntaxError: invalid syntax
I have no idea what this means.