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

Method get_amount_from_entry

Finance_Tracker/main.py:130–138  ·  view source on GitHub ↗
(self, entry)

Source from the content-addressed store, hash-verified

128 amount_entry.delete(0, 'end')
129
130 def get_amount_from_entry(self, entry):
131 try:
132 amount = float(entry.get())
133 if amount <= 0:
134 raise ValueError
135 return amount
136 except ValueError:
137 messagebox.showerror("Invalid Input", "Please enter a positive number")
138 return None
139
140 def update_plot(self):
141 self.fig.clear()

Callers 2

add_incomeMethod · 0.95
add_expenseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected