- Joined
- Feb 14, 2022
- Messages
- 33
- Reaction score
- 2
hi my name is kiaan and nine years old I am making my first app I am making the buttons I have programmed it to put the word "clicked"on the screen when I click on the button but when I do the word "clicked" does not show up and it does not give a SyntaxError to make it less confusing let me show the code
code:
import turtle
t = turtle.Turtle()
t.hideturtle()
for i in range(2):
t.forward(80)
t.left(90)
t.forward(30)
t.left(90)
t.penup()
t.goto(7, 6)
t.write("Start/Run", font=("Arial",12,"normal"))
def Button_click():
if Button_x<=x<=Button_xButtonlength:
if Button_y<=y<=Button_yButtonWidth:
print("clicked")
t.onclick(Button_click)
I am coding in python
code:
import turtle
t = turtle.Turtle()
t.hideturtle()
for i in range(2):
t.forward(80)
t.left(90)
t.forward(30)
t.left(90)
t.penup()
t.goto(7, 6)
t.write("Start/Run", font=("Arial",12,"normal"))
def Button_click():
if Button_x<=x<=Button_xButtonlength:
if Button_y<=y<=Button_yButtonWidth:
print("clicked")
t.onclick(Button_click)
I am coding in python