Когда я пишу скрипт и запускаю его.Python Terminal starts doing it, but when it comes to prompting a color my program skips this step.
Цель: Modify this program so that before it creates the window, it prompts the user to enter the desired background
color. It should store the user’s responses in a variable, and modify the color of the window according to the
user’s wishes.
(Подсказка: список разрешенных названий цветов можно найти на http://www.tcl.tk/man/tcl8.4/TkCmd/colors. htm. Он включает в себя несколько довольно необычных, таких как «персиковый слой» и«HotPink».) `` `
I mean that I want to run all this script in one click and when it comes to prompt me for this color it have to stop and wait for my input.
Выполнено в Powershell
color = str (input (" Background color ": ")) It thinks that input is the next line ---> Background color: window = turtle.Screen()
import turtle
color = str(input("Background color: "))
window = turtle.Screen()
window.bgcolor(color)
window.title("Hello, Tess!")
tess = turtle.Turtle()
tess.color("blue")
tess.pensize(3)
tess.forward(50)
tess.left(120)
tess.forward(50)
window.mainloop()