[Solved] Unexpected results with delete method

You probably defined a function cercle that draws French circles. The function should look like: def cercle(canv, x, y, rad): return canv.create_oval(x-rad, y-rad, x+rad, y+rad, width=2) Note that the function must return the circle object. Otherwise self.ouvre is None and then you can not delete it as you do not have a reference to the … Read more

[Solved] Meaning of ‘{}+{}’ [duplicate]

I’ll break it down for you. You have a string, ‘{}+{}c’. In Tkinter, when searching for words, you usually find the position of the first letter, and the last letter. To find the position of the last letter of the word, you need to find the length of the word, and add that to the … Read more

[Solved] Meaning of ‘{}+{}’ [duplicate]

Introduction The ‘{}+{}’ notation is a mathematical expression that is used to denote the sum of two numbers. It is a shorthand way of writing the addition of two numbers, and is commonly used in algebra and other mathematical equations. This notation is also used in programming languages such as C++ and Java, where it … Read more

[Solved] Tkinter Python 3.3.2 calculator [closed]

You can use an instance of a tkinter Label widget for the display, and a group of tkinter Button widgets for the buttons. Use the grid geometry manager to organize them on the screen. You can associate each button with a command that will either add a number to an internal register, or perform a … Read more

[Solved] tkinter code showing unexpected behavior

in the lines txtRefernce=Entry(f1,font=(‘arial’, 16,’bold’), textvarible=rand, bd=10, insertwidth=4,bg=”powder blue”, justify=’right’) You forgot an A in the textvariable param txtRefernce=Entry(f1,font=(‘arial’, 16,’bold’), textvariable=rand, bd=10, insertwidth=4,bg=”powder blue”, justify=’right’) The error is in the -textvariable param try correcting this part ALSO in the 195th line you forgot a # in the #ffffff color it worked just fine when I … Read more

[Solved] what is meaning of string inside array python

When you use x[y] = z, it calls the __setitem__ method. i.e. x.__setitem__(y, z) In your case, CmdBtn[‘menu’] = CmdBtn.menu means CmdBtn.__setitem__(‘menu’, CmdBtn.menu) The Menubutton class does indeed provide a __setitem__ method. It looks like this is used to set a “resource value” (in this case CmdBtn.menu) for the given key (‘menu’). solved what is … Read more

[Solved] Print a sentence with placeholder and function from an external file. Problem with importing forms, using and retrieving content

Move the dictionaries in dicts.py and create a class in template.py to return required template.You can create as many templates as you want in templates.py. dicts.py teams = {…} nouns = {…} article_words = {…} template.py from grammer import getArticle import random class Template(): def __init__(self,**kwargs): self.__dict__.update(kwargs) # must define other variables like article which … Read more