Oct-14-2019, 03:30 PM
(Oct-13-2019, 10:11 PM)joe_momma Wrote: my observation of your code is you don't need the while loop-
tkinter is using the mainloop to cycle events everything in your
loop could be put in a function and updated with correct guess.
an easy way of getting random colors is:
>>> from random import choice >>> list_colors= ['red','green','blue'] >>> choice(list_colors) 'red' >>> choice(list_colors) 'green' >>>in your function add global points
points = 0 #counts points def submit(): global points Pinput = Box.get() ,,,,,,,,have seen guizero? it's a module based on tkinter great for starting and
basic interfaces guizero found here
the reason i'm suggesting it is because all your labels could be textvariables and in
guizero would make them by default.
Thanks! I will also look into guizero, GUI (Tkinter) is just a side project to keep me interested in python (becuase I am still in school and I want to focus on getting good grades in computer science)