import turtle
turtle.color ("black", "red")
turtle. speed (10)
while True:
a = input("введите действие (вперед-w, назад-s, влево-a, направо-d):"))
if a == "w":
u = int(input("насколько?:"))
turtle.forward (u)
if
does not work in Python turtle, please help
Почему в Python turtle не работает "IF"?
The initial problem is this line:
а = input("..."))
You have one too many closing parentheses. Try not to confuse the parentheses inside the quotes and the ones outside. Running your code should have produced an error:
SyntaxError: unmatched ')'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.