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

Commit 22d69b6

Browse files
authored
Merge branch 'Mrinank-Bhowmick:main' into computer-algebra
2 parents a5a3890 + 22a356e commit 22d69b6

22 files changed

Lines changed: 1997 additions & 502 deletions

README.md

Lines changed: 156 additions & 149 deletions
Large diffs are not rendered by default.

projects/Calculator/main.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,25 @@ def average():
5656

5757

5858
def factorial(num):
59+
"""
60+
Function to calculate the factorial of a number.
61+
62+
Takes a number as an argument, calculates the factorial of the number,
63+
and returns the result.
64+
"""
5965
answer = 1
6066
for i in range(num):
6167
answer *= i + 1
6268
return answer
6369

6470

6571
def complex_arithmetic():
72+
"""
73+
Function to execute complex arithmetic operations such as addition, subtraction, multiplication, and division.
74+
75+
Asks the user to choose the operation and input the complex numbers as real and imaginary parts,
76+
performs the operation, and returns the result.
77+
"""
6678
print("Enter '1' for complex addition")
6779
print("Enter '2' for complex subtraction")
6880
print("Enter '3' for complex multiplication")
@@ -118,6 +130,12 @@ def complex_arithmetic():
118130

119131

120132
def binomial(num):
133+
"""
134+
Function to calculate the binomial coefficient.
135+
136+
Takes two numbers as arguments, calculates the binomial coefficient using the formula n!/(k!(n-k)!),
137+
and returns the result.
138+
"""
121139
result = factorial(num[0]) / (factorial(num[1]) * factorial(num[0] - num[1]))
122140
return result
123141

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,46 @@
1-
# Program to display calendar
2-
3-
4-
def display_calendar(year, month):
1+
def display_cal(year_input, month_input):
52
"""
6-
Display a calendar for the given year and month.
3+
Display a calendar for the desired year and month.
74
85
Parameters:
9-
year (int): The year for which the calendar is to be displayed.
10-
month (int): The month for which the calendar is to be displayed.
6+
year_input (int): The year for which the calendar is to be displayed.
7+
month_input (int): The month for which the calendar is to be displayed.
118
129
"""
1310
import calendar
1411

15-
print(calendar.month(year, month))
12+
print(calendar.month(year_input, month_input))
1613

1714

18-
def get_valid_year():
15+
def fetch_year():
1916
"""
20-
Function to prompt the user for a valid year input and return the valid year as an integer.
17+
Prompts the user for a valid year and returns the year as an integer.
2118
"""
2219
while True:
2320
try:
24-
year = int(input("Enter year: "))
25-
if year < 0:
21+
year_input = int(input("Enter year: "))
22+
if year_input < 0:
2623
raise ValueError("Year must be a positive integer")
27-
return year
24+
return year_input
2825
except ValueError:
2926
print("Invalid input. Please enter a valid year.")
3027

3128

32-
def get_valid_month():
29+
def fetch_month():
3330
"""
34-
A function that prompts the user to enter a month, validates the input, and returns the valid month.
31+
Function that asks the user to enter a month, validates the input, and returns the valid month.
3532
"""
3633
while True:
3734
try:
38-
month = int(input("Enter month: "))
39-
if month < 1 or month > 12:
35+
month_input = int(input("Enter month: "))
36+
if month_input < 1 or month_input > 12:
4037
raise ValueError("Month must be between 1 and 12")
41-
return month
38+
return month_input
4239
except ValueError:
4340
print("Invalid input. Please enter a valid month.")
4441

4542

46-
year = get_valid_year()
47-
month = get_valid_month()
43+
year_input = fetch_year()
44+
month_input = fetch_month()
4845

49-
display_calendar(year, month)
46+
display_cal(year_input, month_input)

projects/Expense-Tracker/README.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Expense Tracker Application
2+
3+
The Expense Tracker Application is a GUI application built using Python and
4+
Customtkinter/Tkinter for
5+
managing expenses. It allows users to add, update, and delete expense items, generate reports in Excel and PDF formats,
6+
and visualize expense data by category.
7+
8+
---
9+
10+
## Features
11+
12+
- Add, update, and delete expense items.
13+
- Generate reports in Excel and PDF formats.
14+
- Visualize expense data by category.
15+
- User-friendly graphical interface.
16+
17+
---
18+
19+
## Installation
20+
21+
1. Clone the [python-beginner-projects](https://github.com/Mrinank-Bhowmick/python-beginner-projects) repository to your
22+
local machine:
23+
24+
```
25+
git clone https://github.com/Mrinank-Bhowmick/python-beginner-projects.git
26+
```
27+
28+
2. Navigate to the project directory:
29+
30+
```
31+
cd python-beginner-projects/projects/Expense-Tracker
32+
```
33+
34+
3. Install the required dependencies:
35+
36+
```
37+
pip install -r requirements.txt
38+
```
39+
40+
---
41+
42+
## Usage
43+
44+
1. Run the application:
45+
46+
```
47+
python app.py
48+
```
49+
50+
2. The Expense Tracker GUI will open, allowing you to interact with the application.
51+
52+
3. Add, update, or delete expense items using the provided form and buttons.
53+
54+
4. Generate reports by navigating to the "Report" tab and clicking on the respective buttons for Excel or PDF reports.
55+
56+
5. Visualize expense data by navigating to the "Summary By Category" tab.
57+
58+
You can also run the sample using:
59+
60+
```
61+
python sample.py
62+
```
63+
64+
which would use dummy data to test the app.
65+
66+
---
67+
68+
## Screenshots
69+
70+
### Adding Item
71+
72+
![Adding Item](media/adding-item.gif)
73+
74+
### Updating Item
75+
76+
![Updating Item](media/updating-items.gif)
77+
78+
### Deleting Items
79+
80+
![Deleting Items](media/deleting-items.gif)
81+
82+
### Viewing Summary Statistics
83+
84+
![Summary Statistics](media/summary-stats.gif)
85+
86+
### Generating Reports
87+
88+
![Generating Reports](media/generating-reports.gif)
89+
90+
### Excel Report
91+
92+
![Excel Report 1](media/report-excel-1.JPG)
93+
![Excel Report 2](media/report-excel-2.JPG)
94+
95+
### PDF Report
96+
97+
![PDF Report](media/report-pdf.JPG)
98+
99+
100+
---
101+
102+
## Tasks
103+
104+
- [X] Expense Categorization: This feature allows users to classify their expenses into categories like food,
105+
transportation, and entertainment, and provides a summary based on these categories.
106+
- [X] Date Range Filtering: This feature enables users to filter and view their expenses within a specific date range.
107+
- [X] Expense Analysis: This feature offers statistical insights such as the average expense, highest expense, lowest
108+
expense, etc.
109+
- [X] Data Saving and Loading: This feature lets users save their expense data to a file (like CSV or JSON) and load it
110+
back when needed.
111+
- [X] Data Export to PDF/Excel: This feature enables users to export their expense data to common formats like PDF or
112+
Excel for easy sharing or printing.
113+
- [ ] Currency Converter: For users dealing with multiple currencies, this feature provides an option to convert
114+
expenses to a preferred currency.
115+
116+

0 commit comments

Comments
 (0)