MCPcopy Index your code
hub / github.com/geekcomputers/Python / equals

Function equals

gui_calculator.py:104–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102
103
104def equals():
105 global x
106 if x == 1:
107 c = (eval(txt1.get())) + add.b
108 cls()
109 txt1.insert(0, c)
110
111 elif x == 2:
112 c = subtract.b - (eval(txt1.get()))
113 cls()
114 txt1.insert(0, c)
115
116 elif x == 3:
117 c = multiply.b * (eval(txt1.get()))
118 cls()
119 txt1.insert(0, c)
120 elif x == 4:
121 c = divide.b / (eval(txt1.get()))
122 cls()
123 txt1.insert(0, c)
124
125
126def cls():

Callers

nothing calls this directly

Calls 3

clsFunction · 0.85
getMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected