Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 02129fe

Browse files
authored
Merge branch 'main' into johnrtitor
2 parents 4364bef + 1ede9ae commit 02129fe

6 files changed

Lines changed: 370 additions & 73 deletions

File tree

README.md

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 align="center">
22
<a href="https://github.com/Mrinank-Bhowmick/python-beginner-projects">
3-
<img src="https://github.com/TERNION-1121/python-beginner-projects/assets/97667653/49a5f382-4b31-41cc-bb19-aa87982a9518" height="405" width="720">
3+
<img src="https://raw.githubusercontent.com/Mrinank-Bhowmick/python-beginner-projects/main/Banner.png" height="405" width="720">
44
</a>
55
</h1>
66

@@ -1548,6 +1548,13 @@
15481548
<sub><b>Maglionaire</b></sub>
15491549
</a>
15501550
</td>
1551+
<td align="center">
1552+
<a href="https://github.com/Gabriela20103967">
1553+
<img src="https://avatars.githubusercontent.com/u/129247240?v=4" width="100;" alt="Gabriela20103967"/>
1554+
<br />
1555+
<sub><b>Gabriela20103967</b></sub>
1556+
</a>
1557+
</td>
15511558
<td align="center">
15521559
<a href="https://github.com/Guillotine189">
15531560
<img src="https://avatars.githubusercontent.com/u/114574134?v=4" width="100;" alt="Guillotine189"/>
@@ -1561,15 +1568,15 @@
15611568
<br />
15621569
<sub><b>Ishan Joshi</b></sub>
15631570
</a>
1564-
</td>
1571+
</td></tr>
1572+
<tr>
15651573
<td align="center">
15661574
<a href="https://github.com/Rathish-Rajendran">
15671575
<img src="https://avatars.githubusercontent.com/u/61904970?v=4" width="100;" alt="Rathish-Rajendran"/>
15681576
<br />
15691577
<sub><b>Rathish R</b></sub>
15701578
</a>
1571-
</td></tr>
1572-
<tr>
1579+
</td>
15731580
<td align="center">
15741581
<a href="https://github.com/siddharth9300">
15751582
<img src="https://avatars.githubusercontent.com/u/83226178?v=4" width="100;" alt="siddharth9300"/>
@@ -1604,15 +1611,15 @@
16041611
<br />
16051612
<sub><b>Abhinandan Singla</b></sub>
16061613
</a>
1607-
</td>
1614+
</td></tr>
1615+
<tr>
16081616
<td align="center">
16091617
<a href="https://github.com/adixoo">
16101618
<img src="https://avatars.githubusercontent.com/u/124980341?v=4" width="100;" alt="adixoo"/>
16111619
<br />
16121620
<sub><b>Aditya Kumar</b></sub>
16131621
</a>
1614-
</td></tr>
1615-
<tr>
1622+
</td>
16161623
<td align="center">
16171624
<a href="https://github.com/AdityaSahai123">
16181625
<img src="https://avatars.githubusercontent.com/u/72221032?v=4" width="100;" alt="AdityaSahai123"/>
@@ -1647,15 +1654,15 @@
16471654
<br />
16481655
<sub><b>AtharvaDeshmukh0909</b></sub>
16491656
</a>
1650-
</td>
1657+
</td></tr>
1658+
<tr>
16511659
<td align="center">
16521660
<a href="https://github.com/ayushi-ras">
16531661
<img src="https://avatars.githubusercontent.com/u/112415152?v=4" width="100;" alt="ayushi-ras"/>
16541662
<br />
16551663
<sub><b>Ayushi Rastogi</b></sub>
16561664
</a>
1657-
</td></tr>
1658-
<tr>
1665+
</td>
16591666
<td align="center">
16601667
<a href="https://github.com/Crack-er-jack">
16611668
<img src="https://avatars.githubusercontent.com/u/82202860?v=4" width="100;" alt="Crack-er-jack"/>
@@ -1690,15 +1697,15 @@
16901697
<br />
16911698
<sub><b>Dishant Nagpal</b></sub>
16921699
</a>
1693-
</td>
1700+
</td></tr>
1701+
<tr>
16941702
<td align="center">
16951703
<a href="https://github.com/EbrG786">
16961704
<img src="https://avatars.githubusercontent.com/u/82704148?v=4" width="100;" alt="EbrG786"/>
16971705
<br />
16981706
<sub><b>Ebrahim G</b></sub>
16991707
</a>
1700-
</td></tr>
1701-
<tr>
1708+
</td>
17021709
<td align="center">
17031710
<a href="https://github.com/GargiMittal">
17041711
<img src="https://avatars.githubusercontent.com/u/98906186?v=4" width="100;" alt="GargiMittal"/>
@@ -1733,15 +1740,15 @@
17331740
<br />
17341741
<sub><b>Jishnudeep Borah</b></sub>
17351742
</a>
1736-
</td>
1743+
</td></tr>
1744+
<tr>
17371745
<td align="center">
17381746
<a href="https://github.com/Josephtobi">
17391747
<img src="https://avatars.githubusercontent.com/u/49555155?v=4" width="100;" alt="Josephtobi"/>
17401748
<br />
17411749
<sub><b>Josephtobi</b></sub>
17421750
</a>
1743-
</td></tr>
1744-
<tr>
1751+
</td>
17451752
<td align="center">
17461753
<a href="https://github.com/Jyothi-Dk">
17471754
<img src="https://avatars.githubusercontent.com/u/98461773?v=4" width="100;" alt="Jyothi-Dk"/>
@@ -1776,15 +1783,15 @@
17761783
<br />
17771784
<sub><b>Mohamed Khaled Yousef</b></sub>
17781785
</a>
1779-
</td>
1786+
</td></tr>
1787+
<tr>
17801788
<td align="center">
17811789
<a href="https://github.com/jusinamine">
17821790
<img src="https://avatars.githubusercontent.com/u/36046405?v=4" width="100;" alt="jusinamine"/>
17831791
<br />
17841792
<sub><b>Mohammed El Amine Benkorreche</b></sub>
17851793
</a>
1786-
</td></tr>
1787-
<tr>
1794+
</td>
17881795
<td align="center">
17891796
<a href="https://github.com/nik-6174">
17901797
<img src="https://avatars.githubusercontent.com/u/78644716?v=4" width="100;" alt="nik-6174"/>
@@ -1819,15 +1826,15 @@
18191826
<br />
18201827
<sub><b>Prajwol Shrestha</b></sub>
18211828
</a>
1822-
</td>
1829+
</td></tr>
1830+
<tr>
18231831
<td align="center">
18241832
<a href="https://github.com/pranavdasan">
18251833
<img src="https://avatars.githubusercontent.com/u/62214486?v=4" width="100;" alt="pranavdasan"/>
18261834
<br />
18271835
<sub><b>Pranav Dasan</b></sub>
18281836
</a>
1829-
</td></tr>
1830-
<tr>
1837+
</td>
18311838
<td align="center">
18321839
<a href="https://github.com/Pratham-H-S">
18331840
<img src="https://avatars.githubusercontent.com/u/126776410?v=4" width="100;" alt="Pratham-H-S"/>
@@ -1862,15 +1869,15 @@
18621869
<br />
18631870
<sub><b>Raveny</b></sub>
18641871
</a>
1865-
</td>
1872+
</td></tr>
1873+
<tr>
18661874
<td align="center">
18671875
<a href="https://github.com/RishiPastor05">
18681876
<img src="https://avatars.githubusercontent.com/u/87607061?v=4" width="100;" alt="RishiPastor05"/>
18691877
<br />
18701878
<sub><b>RishiPastor05</b></sub>
18711879
</a>
1872-
</td></tr>
1873-
<tr>
1880+
</td>
18741881
<td align="center">
18751882
<a href="https://github.com/Surya-29">
18761883
<img src="https://avatars.githubusercontent.com/u/75674235?v=4" width="100;" alt="Surya-29"/>
@@ -1905,15 +1912,15 @@
19051912
<br />
19061913
<sub><b>Shubham Kumar</b></sub>
19071914
</a>
1908-
</td>
1915+
</td></tr>
1916+
<tr>
19091917
<td align="center">
19101918
<a href="https://github.com/sudhanshu-77">
19111919
<img src="https://avatars.githubusercontent.com/u/97780892?v=4" width="100;" alt="sudhanshu-77"/>
19121920
<br />
19131921
<sub><b>Sudhanshu Tripathi</b></sub>
19141922
</a>
1915-
</td></tr>
1916-
<tr>
1923+
</td>
19171924
<td align="center">
19181925
<a href="https://github.com/SulimanSagindykov">
19191926
<img src="https://avatars.githubusercontent.com/u/115887342?v=4" width="100;" alt="SulimanSagindykov"/>
@@ -1948,15 +1955,15 @@
19481955
<br />
19491956
<sub><b>Vikash</b></sub>
19501957
</a>
1951-
</td>
1958+
</td></tr>
1959+
<tr>
19521960
<td align="center">
19531961
<a href="https://github.com/Vishvam10">
19541962
<img src="https://avatars.githubusercontent.com/u/78094956?v=4" width="100;" alt="Vishvam10"/>
19551963
<br />
19561964
<sub><b>Vishvam S</b></sub>
19571965
</a>
1958-
</td></tr>
1959-
<tr>
1966+
</td>
19601967
<td align="center">
19611968
<a href="https://github.com/Vivek-GuptaXCode">
19621969
<img src="https://avatars.githubusercontent.com/u/145761266?v=4" width="100;" alt="Vivek-GuptaXCode"/>
@@ -1991,15 +1998,15 @@
19911998
<br />
19921999
<sub><b>Ambush</b></sub>
19932000
</a>
1994-
</td>
2001+
</td></tr>
2002+
<tr>
19952003
<td align="center">
19962004
<a href="https://github.com/wre9-tesh">
19972005
<img src="https://avatars.githubusercontent.com/u/96977189?v=4" width="100;" alt="wre9-tesh"/>
19982006
<br />
19992007
<sub><b>Amitesh Kumar</b></sub>
20002008
</a>
2001-
</td></tr>
2002-
<tr>
2009+
</td>
20032010
<td align="center">
20042011
<a href="https://github.com/benedictprajwal">
20052012
<img src="https://avatars.githubusercontent.com/u/114901414?v=4" width="100;" alt="benedictprajwal"/>
@@ -2034,15 +2041,15 @@
20342041
<br />
20352042
<sub><b>Darsh Baxi</b></sub>
20362043
</a>
2037-
</td>
2044+
</td></tr>
2045+
<tr>
20382046
<td align="center">
20392047
<a href="https://github.com/faizaslam11">
20402048
<img src="https://avatars.githubusercontent.com/u/60103930?v=4" width="100;" alt="faizaslam11"/>
20412049
<br />
20422050
<sub><b>Faiz Aslam</b></sub>
20432051
</a>
2044-
</td></tr>
2045-
<tr>
2052+
</td>
20462053
<td align="center">
20472054
<a href="https://github.com/jakbin">
20482055
<img src="https://avatars.githubusercontent.com/u/65591973?v=4" width="100;" alt="jakbin"/>
@@ -2077,15 +2084,15 @@
20772084
<br />
20782085
<sub><b>Zainab Ibraheem</b></sub>
20792086
</a>
2080-
</td>
2087+
</td></tr>
2088+
<tr>
20812089
<td align="center">
20822090
<a href="https://github.com/mr-desilva">
20832091
<img src="https://avatars.githubusercontent.com/u/47147935?v=4" width="100;" alt="mr-desilva"/>
20842092
<br />
20852093
<sub><b>Tharindu De Silva</b></sub>
20862094
</a>
2087-
</td></tr>
2088-
<tr>
2095+
</td>
20892096
<td align="center">
20902097
<a href="https://github.com/myudak">
20912098
<img src="https://avatars.githubusercontent.com/u/69108782?v=4" width="100;" alt="myudak"/>
@@ -2120,15 +2127,15 @@
21202127
<br />
21212128
<sub><b>Prabin Shrestha</b></sub>
21222129
</a>
2123-
</td>
2130+
</td></tr>
2131+
<tr>
21242132
<td align="center">
21252133
<a href="https://github.com/pratyusha0710">
21262134
<img src="https://avatars.githubusercontent.com/u/115498333?v=4" width="100;" alt="pratyusha0710"/>
21272135
<br />
21282136
<sub><b>PRATYUSHA CHATURVEDI</b></sub>
21292137
</a>
2130-
</td></tr>
2131-
<tr>
2138+
</td>
21322139
<td align="center">
21332140
<a href="https://github.com/samualmartin">
21342141
<img src="https://avatars.githubusercontent.com/u/38009832?v=4" width="100;" alt="samualmartin"/>

projects/Budget-manager/main.py

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
conn.commit()
1919

2020

21-
# Function to add a transaction to the database
21+
# Function to add a transaction to the database.
2222
def add_transaction():
23+
"""
24+
Adds a transaction to the database based on user input.
25+
"""
2326
date = date_entry.get()
2427
description = description_entry.get()
2528
amount = amount_entry.get()
@@ -39,25 +42,53 @@ def add_transaction():
3942
messagebox.showwarning("Warning", "Please fill in all fields.")
4043

4144

42-
# Function to clear input fields
45+
def delete_transaction():
46+
"""
47+
Deletes a selected transaction from the database.
48+
"""
49+
selected_index = transaction_listbox.curselection()
50+
if selected_index:
51+
transaction_id = transaction_listbox.get(selected_index)[0]
52+
c.execute("DELETE FROM transactions WHERE id=?", (transaction_id,))
53+
conn.commit()
54+
update_transaction_list()
55+
update_balance()
56+
messagebox.showinfo("Success", "Transaction deleted successfully!")
57+
else:
58+
messagebox.showwarning("Warning", "Please select a transaction to delete")
59+
60+
61+
# Function to clear input fields.
62+
63+
4364
def clear_entries():
65+
"""
66+
Clears all input fields.
67+
"""
4468
date_entry.delete(0, tk.END)
4569
description_entry.delete(0, tk.END)
4670
amount_entry.delete(0, tk.END)
4771
category_combobox.set("")
72+
category_combobox.config(state="readonly")
4873

4974

50-
# Function to update the transaction list
75+
# Function to update the transaction list.
5176
def update_transaction_list():
77+
"""
78+
Updates the displayed transaction list based on the database entries.
79+
"""
5280
transaction_listbox.delete(0, tk.END)
5381
c.execute("SELECT * FROM transactions")
5482
transactions = c.fetchall()
5583
for transaction in transactions:
5684
transaction_listbox.insert(tk.END, transaction)
5785

5886

59-
# Function to calculate and display the current balance
87+
# Function to calculate and display the current balance.
6088
def update_balance():
89+
"""
90+
Calculates and displays the current balance based on income and expenses.
91+
"""
6192
c.execute("SELECT SUM(amount) FROM transactions")
6293
total_income = c.fetchone()[0]
6394
if total_income is None:
@@ -70,11 +101,15 @@ def update_balance():
70101
balance_label.config(text=f"Current Balance: ${balance:.2f}")
71102

72103

73-
# Create the main window
104+
# Create the main window.
74105
root = tk.Tk()
75106
root.title("Personal Budget Manager")
107+
root.columnconfigure(1, weight=1)
108+
root.columnconfigure(3, weight=1)
109+
root.columnconfigure(5, weight=1)
76110

77-
# Create and configure widgets
111+
# Create and configure widgets.
112+
delete_button = tk.Button(root, text="Delete Transaction", command=delete_transaction)
78113
date_label = tk.Label(root, text="Date:")
79114
date_entry = tk.Entry(root, width=15)
80115
description_label = tk.Label(root, text="Description:")
@@ -99,7 +134,8 @@ def update_balance():
99134
transaction_listbox = tk.Listbox(root, width=50)
100135
balance_label = tk.Label(root, text="Current Balance: $0.00")
101136

102-
# Place widgets in the window
137+
# Place widgets in the window.
138+
delete_button.grid(row=0, column=9, padx=10, pady=10)
103139
date_label.grid(row=0, column=0, padx=10, pady=10)
104140
date_entry.grid(row=0, column=1, padx=10, pady=10)
105141
description_label.grid(row=0, column=2, padx=10, pady=10)
@@ -112,7 +148,7 @@ def update_balance():
112148
transaction_listbox.grid(row=1, column=0, columnspan=9, padx=10, pady=10)
113149
balance_label.grid(row=2, column=0, columnspan=9, padx=10, pady=10)
114150

115-
# Initialize the transaction list and balance
151+
# Initialize the transaction list and balance.
116152
update_transaction_list()
117153
update_balance()
118154

0 commit comments

Comments
 (0)