Exemple #1
0
def add_to_num(e):
    calc.add_to_num(e.widget.cget("text"))
    result.config(text=calc.get_num())
Exemple #2
0
def multiply (e):
    calc.setMathSign(2)
    if calc.num_num == 0:
        example.config(text=str(calc.get_num())+calc.get_sign())
    else:
        example.config(text=example.cget("text")+str(calc.get_num()))
Exemple #3
0
def divide (e):
    calc.setMathSign(3)
    if calc.num_num == 0:
        example.config(text=str(calc.get_num())+calc.get_sign())
    else:
        example.config(text=example.cget("text")+str(calc.get_num()))
Exemple #4
0
def minus(e):
    calc.set_math_sign(1)
    if calc.num_num == 0:
        example.config(text=str(calc.get_num()) + calc.get_sign())
    else:
        example.config(text=example.cget("text") + str(calc.get_num()))