Error oftas det kommer med " import Turtle" !
Traceback (most recent call last): File "C:\Users\PC\Documents\Python\00.py", line 1, in <module> import turtle File "C:\Users\PC\Documents\Python\turtle.py", line 3, in <module> turtle.color('red')AttributeError: module 'turtle' has no attribute 'color' (consider renaming 'C:\Users\PC\Documents\Python\turtle.py' since it has the same name as the standard library module named 'turtle' and prevents importing that standard library module)
Hej och välkommen till Pluggakuten!
Hur ser din kod ut? Använd gärna knappen för att infoga programkod. Den ser ut som ett semikolon.
Nu kan jag dock gissa att du har en fil turtle.py i samma katalog som din 00.py. Det är kanske inte den du vill importera, vilket felmeddelandet antyder.
import turtle
color = input("Which color?")
turtle.color(color)
turtle.forward(150)
Hej!
För det finns en standard library som heter turtle då får du ändra namnet till något annat.
Tack, men hur?
Döp om turtle.py =)
Tack för hjälpen.