Hi guys i need help understanding fundamental uses of variables and functions.
I created a class for a calculator:
This poses another question: How am i even suppose to know what parameters Entry accepts if while typing the code in PyCharm, hint is pretty much useless and gives no examples nor lists accepted parameters ?
Thanks !
I created a class for a calculator:
class calc:
def mult(a,b):
global result #Declaration must take place in each function. Else its local
result = a*b
def div(a,b):
global result #Declaration must take place in each function. Else its local
result=a*b
def add(a,b):
global result #Declaration must take place in each function. Else its local
result = a*b
def sub(a,b):
global result #Declaration must take place in each function. Else its local
result = a*b Then i want to create window with a button using tkinterfrom tkinter import *
window = Tk()
window.title('Calculator')
window.geometry("300x200")
entry = Entry(window,text="Enter data")
button = Button(window,text="Click me")
mainloop()I get no entry nor button on the screen because i cant figure out how to set their position.This poses another question: How am i even suppose to know what parameters Entry accepts if while typing the code in PyCharm, hint is pretty much useless and gives no examples nor lists accepted parameters ?
Thanks !
