MCPcopy Index your code
hub / github.com/ndleah/python-mini-project / calculate

Function calculate

infix_postfix_calculator/main.py:109–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107btn.pack()
108
109def calculate():
110 infix_str = infix.get()
111 tempinfix_str = parse_infix(infix_str)
112 postfix_str = convert_to_postfix(tempinfix_str)
113 result_str = calculate_postfix(postfix_str)
114 tempinfix.delete(0, END)
115 tempinfix.insert(0, tempinfix_str)
116 postfix.delete(0, END)
117 postfix.insert(0, postfix_str)
118 result.delete(0, END)
119 result.insert(0, result_str)
120
121btn["command"] = calculate
122root.mainloop()

Callers

nothing calls this directly

Calls 4

parse_infixFunction · 0.85
convert_to_postfixFunction · 0.85
calculate_postfixFunction · 0.85
insertMethod · 0.80

Tested by

no test coverage detected