Python Forum
Clicker count increase by 1 each time
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clicker count increase by 1 each time
#1
Trying out making a clicker game and wondering what the likely simple fix to this is. I'm not quite sure how to approach it but I want to have the clicker count increase by 1 each time. Thanks in advance

def button():
    a = 0
    b = 1
    result = a + b
    counter_label = Label(root, text=str(result) + " cookies")
    counter_label.grid(row=4, column=2)


button_click = Button(root, command=button, text="Click", width=15, height=5)
button_click.grid(row=2, column=2)

root.mainloop()
Reply


Messages In This Thread
Clicker count increase by 1 each time - by blakefindlay - Feb-02-2021, 11:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Row Count and coloumn count Yegor123 4 1,388 Oct-18-2022, 03:52 AM
Last Post: Yegor123
  Increase the speed of a python loop over a pandas dataframe mcva 0 1,344 Jan-21-2022, 06:24 PM
Last Post: mcva
  How to increase the size of a png picture for the heatmap of the correlation? lulu43366 9 3,642 Oct-06-2021, 04:15 PM
Last Post: deanhystad
  Using SoX in Python to Increase mp3 Bitrate DRT 1 1,796 Jul-10-2021, 08:41 PM
Last Post: DRT
  increase and decrease a slice value? KEYS 2 2,140 Nov-10-2020, 11:35 PM
Last Post: KEYS
  Increase Numbers forever and need reset? ATARI_LIVE 4 2,398 Oct-23-2020, 01:55 PM
Last Post: ATARI_LIVE
  The count variable is giving me a hard time in this code D4isyy 2 1,997 Aug-09-2020, 10:32 PM
Last Post: bowlofred
  Please help me with keyboard clicker jurij7 0 1,335 May-04-2020, 07:30 PM
Last Post: jurij7
  How do I add an element to a dic and increase an existing value Kanashi 2 1,875 Nov-21-2019, 02:56 PM
Last Post: ThomasL
  Count to movement according to the time pressed button noartist 1 2,553 Feb-27-2019, 01:33 PM
Last Post: noartist

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020