This is especially for beginners...Do submit your simple pull requests...Get your free hacktoberfest T-Shirt
import datetime
import sqlite3
from tkcalendar import DateEntry

from tkinter import *
import tkinter.messagebox as mb
import tkinter.ttk as ttk

# Connecting to the Database
connector = sqlite3.connect("Expense Tracker.db")
cursor = connector.cursor()

connector.execute(
	'CREATE TABLE IF NOT EXISTS ExpenseTracker (ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, Date DATETIME, Payee TEXT, Description TEXT, Amount FLOAT, ModeOfPayment TEXT)'
)
connector.commit()

# Functions
def list_all_expenses():
	global connector, table

	table.delete(*table.get_children())

	all_data = connector.execute('SELECT * FROM ExpenseTracker')
	data = all_data.fetchall()

	for values in data:
		table.insert('', END, values=values)


def view_expense_details():
	global table
	global date, payee, desc, amnt, MoP

	if not table.selection():
		mb.showerror('No expense selected', 'Please select an expense from the table to view its details')

	current_selected_expense = table.item(table.focus())
	values = current_selected_expense['values']

	expenditure_date = datetime.date(int(values[1][:4]), int(values[1][5:7]), int(values[1][8:]))

	date.set_date(expenditure_date) ; payee.set(values[2]) ; desc.set(values[3]) ; amnt.set(values[4]) ; MoP.set(values[5])


def clear_fields():
	global desc, payee, amnt, MoP, date, table

	today_date = datetime.datetime.now().date()

	desc.set('') ; payee.set('') ; amnt.set(0.0) ; MoP.set('Cash'), date.set_date(today_date)
	table.selection_remove(*table.selection())


def remove_expense():
	if not table.selection():
		mb.showerror('No record selected!', 'Please select a record to delete!')
		return

	current_selected_expense = table.item(table.focus())
	values_selected = current_selected_expense['values']

	surety = mb.askyesno('Are you sure?', f'Are you sure that you want to delete the record of {values_selected[2]}')

	if surety:
		connector.execute('DELETE FROM ExpenseTracker WHERE ID=%d' % values_selected[0])
		connector.commit()

		list_all_expenses()
		mb.showinfo('Record deleted successfully!', 'The record you wanted to delete has been deleted successfully')


def remove_all_expenses():
	surety = mb.askyesno('Are you sure?', 'Are you sure that you want to delete all the expense items from the database?', icon='warning')

	if surety:
		table.delete(*table.get_children())

		connector.execute('DELETE FROM ExpenseTracker')
		connector.commit()

		clear_fields()
		list_all_expenses()
		mb.showinfo('All Expenses deleted', 'All the expenses were successfully deleted')
	else:
		mb.showinfo('Ok then', 'The task was aborted and no expense was deleted!')


def add_another_expense():
	global date, payee, desc, amnt, MoP
	global connector

	if not date.get() or not payee.get() or not desc.get() or not amnt.get() or not MoP.get():
		mb.showerror('Fields empty!', "Please fill all the missing fields before pressing the add button!")
	else:
		connector.execute(
		'INSERT INTO ExpenseTracker (Date, Payee, Description, Amount, ModeOfPayment) VALUES (?, ?, ?, ?, ?)',
		(date.get_date(), payee.get(), desc.get(), amnt.get(), MoP.get())
		)
		connector.commit()

		clear_fields()
		list_all_expenses()
		mb.showinfo('Expense added', 'The expense whose details you just entered has been added to the database')


def edit_expense():
	global table

	def edit_existing_expense():
		global date, amnt, desc, payee, MoP
		global connector, table

		current_selected_expense = table.item(table.focus())
		contents = current_selected_expense['values']

		connector.execute('UPDATE ExpenseTracker SET Date = ?, Payee = ?, Description = ?, Amount = ?, ModeOfPayment = ? WHERE ID = ?',
		                  (date.get_date(), payee.get(), desc.get(), amnt.get(), MoP.get(), contents[0]))
		connector.commit()

		clear_fields()
		list_all_expenses()

		mb.showinfo('Data edited', 'We have updated the data and stored in the database as you wanted')
		edit_btn.destroy()
		return

	if not table.selection():
		mb.showerror('No expense selected!', 'You have not selected any expense in the table for us to edit; please do that!')
		return

	view_expense_details()

	edit_btn = Button(data_entry_frame, text='Edit expense', font=btn_font, width=30,
	                  bg=hlb_btn_bg, command=edit_existing_expense)
	edit_btn.place(x=10, y=395)


def selected_expense_to_words():
	global table

	if not table.selection():
		mb.showerror('No expense selected!', 'Please select an expense from the table for us to read')
		return

	current_selected_expense = table.item(table.focus())
	values = current_selected_expense['values']

	message = f'Your expense can be read like: \n"You paid {values[4]} to {values[2]} for {values[3]} on {values[1]} via {values[5]}"'

	mb.showinfo('Here\'s how to read your expense', message)


def expense_to_words_before_adding():
	global date, desc, amnt, payee, MoP

	if not date or not desc or not amnt or not payee or not MoP:
		mb.showerror('Incomplete data', 'The data is incomplete, meaning fill all the fields first!')

	message = f'Your expense can be read like: \n"You paid {amnt.get()} to {payee.get()} for {desc.get()} on {date.get_date()} via {MoP.get()}"'

	add_question = mb.askyesno('Read your record like: ', f'{message}\n\nShould I add it to the database?')

	if add_question:
		add_another_expense()
	else:
		mb.showinfo('Ok', 'Please take your time to add this record')


# Backgrounds anf Fonts
dataentery_frame_bg = 'Red'
buttons_frame_bg = 'Tomato'
hlb_btn_bg = 'IndianRed'

lbl_font = ('Georgia', 13)
entry_font = 'Times 13 bold'
btn_font = ('Gill Sans MT', 13)

# Initializing the GUI window
root = Tk()
root.title('PythonGeeks Expense Tracker')
root.geometry('1200x550')
root.resizable(0, 0)

Label(root, text='EXPENSE TRACKER', font=('Noto Sans CJK TC', 15, 'bold'), bg=hlb_btn_bg).pack(side=TOP, fill=X)

# StringVar and DoubleVar variables
desc = StringVar()
amnt = DoubleVar()
payee = StringVar()
MoP = StringVar(value='Cash')

# Frames
data_entry_frame = Frame(root, bg=dataentery_frame_bg)
data_entry_frame.place(x=0, y=30, relheight=0.95, relwidth=0.25)

buttons_frame = Frame(root, bg=buttons_frame_bg)
buttons_frame.place(relx=0.25, rely=0.05, relwidth=0.75, relheight=0.21)

tree_frame = Frame(root)
tree_frame.place(relx=0.25, rely=0.26, relwidth=0.75, relheight=0.74)

# Data Entry Frame
Label(data_entry_frame, text='Date (M/DD/YY) :', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=50)
date = DateEntry(data_entry_frame, date=datetime.datetime.now().date(), font=entry_font)
date.place(x=160, y=50)

Label(data_entry_frame, text='Payee\t             :', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=230)
Entry(data_entry_frame, font=entry_font, width=31, text=payee).place(x=10, y=260)

Label(data_entry_frame, text='Description           :', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=100)
Entry(data_entry_frame, font=entry_font, width=31, text=desc).place(x=10, y=130)

Label(data_entry_frame, text='Amount\t             :', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=180)
Entry(data_entry_frame, font=entry_font, width=14, text=amnt).place(x=160, y=180)

Label(data_entry_frame, text='Mode of Payment:', font=lbl_font, bg=dataentery_frame_bg).place(x=10, y=310)
dd1 = OptionMenu(data_entry_frame, MoP, *['Cash', 'Cheque', 'Credit Card', 'Debit Card', 'Paytm', 'Google Pay', 'Razorpay'])
dd1.place(x=160, y=305)     ;     dd1.configure(width=10, font=entry_font)

Button(data_entry_frame, text='Add expense', command=add_another_expense, font=btn_font, width=30,
       bg=hlb_btn_bg).place(x=10, y=395)
Button(data_entry_frame, text='Convert to words before adding', font=btn_font, width=30, bg=hlb_btn_bg).place(x=10,y=450)

# Buttons' Frame
Button(buttons_frame, text='Delete Expense', font=btn_font, width=25, bg=hlb_btn_bg, command=remove_expense).place(x=30, y=5)

Button(buttons_frame, text='Clear Fields in DataEntry Frame', font=btn_font, width=25, bg=hlb_btn_bg,
       command=clear_fields).place(x=335, y=5)

Button(buttons_frame, text='Delete All Expenses', font=btn_font, width=25, bg=hlb_btn_bg, command=remove_all_expenses).place(x=640, y=5)

Button(buttons_frame, text='View Selected Expense\'s Details', font=btn_font, width=25, bg=hlb_btn_bg,
       command=view_expense_details).place(x=30, y=65)

Button(buttons_frame, text='Edit Selected Expense', command=edit_expense, font=btn_font, width=25, bg=hlb_btn_bg).place(x=335,y=65)

Button(buttons_frame, text='Convert Expense to a sentence', font=btn_font, width=25, bg=hlb_btn_bg,
       command=selected_expense_to_words).place(x=640, y=65)

# Treeview Frame
table = ttk.Treeview(tree_frame, selectmode=BROWSE, columns=('ID', 'Date', 'Payee', 'Description', 'Amount', 'Mode of Payment'))

X_Scroller = Scrollbar(table, orient=HORIZONTAL, command=table.xview)
Y_Scroller = Scrollbar(table, orient=VERTICAL, command=table.yview)
X_Scroller.pack(side=BOTTOM, fill=X)
Y_Scroller.pack(side=RIGHT, fill=Y)

table.config(yscrollcommand=Y_Scroller.set, xscrollcommand=X_Scroller.set)

table.heading('ID', text='S No.', anchor=CENTER)
table.heading('Date', text='Date', anchor=CENTER)
table.heading('Payee', text='Payee', anchor=CENTER)
table.heading('Description', text='Description', anchor=CENTER)
table.heading('Amount', text='Amount', anchor=CENTER)
table.heading('Mode of Payment', text='Mode of Payment', anchor=CENTER)

table.column('#0', width=0, stretch=NO)
table.column('#1', width=50, stretch=NO)
table.column('#2', width=95, stretch=NO)  # Date column
table.column('#3', width=150, stretch=NO)  # Payee column
table.column('#4', width=325, stretch=NO)  # Title column
table.column('#5', width=135, stretch=NO)  # Amount column
table.column('#6', width=125, stretch=NO)  # Mode of Payment column

table.place(relx=0, y=0, relheight=1, relwidth=1)

list_all_expenses()

# Finalizing the GUI window
root.update()
root.mainloop()

Expense Tracker.py
PrakulDashing/HacktoberFest2023
from tkinter import *
from tkinter import filedialog
import pygame.mixer as mixer        
import os
mixer.init()
def play_song(song_name: StringVar, songs_list: Listbox, status: StringVar):
    song_name.set(songs_list.get(ACTIVE))

    mixer.music.load(songs_list.get(ACTIVE))
    mixer.music.play()

    status.set("Song PLAYING")


def stop_song(status: StringVar):
    mixer.music.stop()
    status.set("Song STOPPED")


def load(listbox):
    os.chdir(filedialog.askdirectory(title='Open a songs directory'))

    tracks = os.listdir()

    for track in tracks:
        listbox.insert(END, track)


def pause_song(status: StringVar):
    mixer.music.pause()
    status.set("Song PAUSED")


def resume_song(status: StringVar):
    mixer.music.unpause()
    status.set("Song RESUMED")

root = Tk()
root.geometry('700x220')     
root.title('Prakul Music Player')
root.resizable(0, 0)

song_frame = LabelFrame(root, text='Current Song', bg='LightBlue', width=400, height=80)
song_frame.place(x=0, y=0)

button_frame = LabelFrame(root, text='Control Buttons', bg='Turquoise', width=400, height=120)
button_frame.place(y=80)

listbox_frame = LabelFrame(root, text='Playlist', bg='RoyalBlue')
listbox_frame.place(x=400, y=0, height=200, width=300)

current_song = StringVar(root, value='<Not selected>')

song_status = StringVar(root, value='<Not Available>')

playlist = Listbox(listbox_frame, font=('Helvetica', 11), selectbackground='Gold')

scroll_bar = Scrollbar(listbox_frame, orient=VERTICAL)
scroll_bar.pack(side=RIGHT, fill=BOTH)

playlist.config(yscrollcommand=scroll_bar.set)

scroll_bar.config(command=playlist.yview)

playlist.pack(fill=BOTH, padx=5, pady=5)

Label(song_frame, text='CURRENTLY PLAYING:', bg='LightBlue', font=('Times', 10, 'bold')).place(x=5, y=20)

song_lbl = Label(song_frame, textvariable=current_song, bg='Goldenrod', font=("Times", 12), width=25)
song_lbl.place(x=150, y=20)

pause_btn = Button(button_frame, text='Pause', bg='Aqua', font=("Georgia", 13), width=7,
                    command=lambda: pause_song(song_status))
pause_btn.place(x=15, y=10)

stop_btn = Button(button_frame, text='Stop', bg='Aqua', font=("Georgia", 13), width=7,
                  command=lambda: stop_song(song_status))
stop_btn.place(x=105, y=10)

play_btn = Button(button_frame, text='Play', bg='Aqua', font=("Georgia", 13), width=7,
                  command=lambda: play_song(current_song, playlist, song_status))
play_btn.place(x=195, y=10)

resume_btn = Button(button_frame, text='Resume', bg='Aqua', font=("Georgia", 13), width=7,
                    command=lambda: resume_song(song_status))
resume_btn.place(x=285, y=10)

load_btn = Button(button_frame, text='Load Directory', bg='Aqua', font=("Georgia", 13), width=35,
                  command=lambda: load(playlist))
load_btn.place(x=10, y=55)
Label(root, textvariable=song_status, bg='SteelBlue', font=('Times', 9), justify=LEFT).pack(side=BOTTOM, fill=X)

root.update()
root.mainloop()

Music Player.py
PrakulDashing/HacktoberFest2023
import os
from tkinter import *
import tkinter as tk
window=Tk()
window.geometry("850x450")
window.title("Welcome to Pranavi PC Control-Room")
head=Label(window, text="Shutdown, Restart and Logout Using Python by Pranavi T", font=('Times_New_Roman 18'))
head.pack(pady=20)

def Shutdown():
    os.system("shutdown /s /t 0")

def Restart():
    os.system("shutdown /r /t 0")

def logout():
    os.system("shutdown /l /t 0")

Button(window,text='Shutdown',command=Shutdown, font=('normal',20), bg='red').pack()
Button(window,text='Restart',command=Restart,font=('normal',20), bg='yellow').pack()
Button(window,text='Logout',command=logout,font=('normal',20), bg='green').pack()

window.mainloop()

PC Controls.py
PrakulDashing/HacktoberFest2023
# ATM MINI PROJECT by Sarthak

import numpy as np
import time

user=np.array(['Sarthak','Pranit'])  #User id
pin=np.array([2284,2297])    #Passwords
bal=np.array([10000,20000])  #Account Balance
ac=np.array([357,378])   #A/C No
OTP=np.array([100,200])  #OTP




print("   Please Insert Your CARD...")
time.sleep(3)
print("\n   Please Enter your Login Credentials:\n")
u=input('Enter user id: ')
a=int(input('Enter Your A/C No: '))
p=int(input('Enter Your password: '))

print(" \n Wait for a second...")
time.sleep(3)

if u==user[0] and p==pin[0] and a==ac[0]:
    print("\n")
    print("***************************************")
    print("*                                     *")
    print("*****WELCOME SARTHAK TO ATM SYSTEM*****")                                    
    print("*                                     *")
    print("***************************************")
    print("\n   How can we Help You:")
    print("    1)Balance Enquiry\n    2)Cash Withdrawl\n    3)Forget Password\n    4)Logout")
    choice=int(input("\nEnter your Choice: "))
    if choice==1:
        print("Your Current Balance is RS",bal[0],"\nTHANKYOU!!! for Visiting us")
    elif choice==2:
        d=eval(input("Enter Amount You want to Withdraw: "))
        print("\n  Wait... Your transaction is being proceed")
        time.sleep(3)
        if d>bal[0]:
            print("You cannot Withdraw Amount more than Your current Balance")
        else:
            print("\nYour A/C is debited by RS",d)
            print("Your Current Balance is RS",bal[0]-d,"\n \nTHANKYOU!!!")
    elif choice==3:
        u=input('Enter user id: ')
        if u==user[0]:
            print("1)Mobile No\n2)Email id")
            choice=int(input("Please Enter Your Choice through which We can send your Password: "))
            if choice==1:
                mo=eval(input("Enter Your Mobile No: "))
                print("OTP has been sent to your Mobile No")
                o=int(input("Enter OTP: "))
                print(" \n Wait for a second...\n")
                time.sleep(2)
                if o==OTP[0]:
                    print("Password has been successfully!!! sent to your Mobile number, please Remember your Password for Future Reference\nPlease Login Again if you want to perform Another Task")
                else:
                    print("Incorrect OTP\nPlease Login Again")
            elif choice==2:
                e=input("Enter Your Email id: ")
                print("OTP has been sent to your Email id")
                o=int(input("Enter OTP: "))
                print("  Wait for a second...")
                time.sleep(2)
                if o==OTP[0]:
                    print("Password has been successfully!!! sent to your Email id, please Remember your Password for Future Reference\nPlease Login Again if you want to perform Another Task")   
                else:
                    print("Incorrect OTP\nPlease Login Again")
            else:
                print("You have Entered Incorrect Choice\nPlease Login Again")
            
        else:
            print("User id is Incorrect\nPlease Login Again")        
    elif choice==4:
        print("1)YES\n2)NO")
        choice=int(input("Are you Sure: "))
        if choice==1:
            print("Thankyou!! for transactions with Our ATM SYSTEM")
            print("Never share Your Password with Anyone, Bank will never ask For Your Password")
        elif choice==2:
            print("Sorry!! Your session has Expired You Need to Login again")
        else:
            print("You have Entered Incorrect Choice")
    else:
        print("Sorry You have Entered Incorrect Choice\nPlease Login Again")
elif u==user[1]and p==pin[1]and a==ac[1]:
    print("\n")
    print("**************************************")
    print("*                                    *")
    print("*****WELCOME PRANIT TO ATM SYSTEM*****")                                    
    print("*                                    *")
    print("**************************************")
    print("\n   How can we Help You:")
    print("    1)Balance Enquiry\n    2)Cash Withdrawl\n    3)Forget Password\n    4)Logout")
    choice=int(input("\nEnter your Choice: "))
    if choice==1:
        print("Your Current Balance is RS",bal[1],"\nTHANKYOU!!! for Visiting us")
    elif choice==2:
        d=eval(input("Enter Amount You want to Withdraw: "))
        print("\n Wait... Your transaction is being proceed")
        time.sleep(3)
        if d>bal[1]:
            print("You cannot Withdraw Amount more than Your current Balance")
        else:
            print("\nYour A/C is Debited by RS",d)
            print("Your Current Balance is RS",bal[1]-d,"\n\n  THANKYOU!!!")
    elif choice==3:
        u=input('Enter user id: ')
        if u==user[1]:
            print("1)Mobile No\n2)Email id")
            choice=int(input("\nPlease Enter Your Choice through which We can send your Password: "))
            if choice==1:
                mo=eval(input("Enter Your Mobile No: "))
                print("OTP has been sent to your Mobile No")
                o=int(input("Enter OTP: "))
                print("  Wait for a second...")
                time.sleep(2)
                if o==OTP[1]:
                    print("Password has been successfully!!! sent to your Mobile number, please Remember your Password for Future Reference\nPlease Login Again if you want to perform Another Task")
                else:
                    print("Incorrect OTP\nPlease Login Again")
            elif choice==2:
                e=input("Enter Your Email id: ")
                print("OTP has been sent to your Email id")
                o=int(input("Enter OTP: "))
                print(" \n Wait for a second...\n")
                time.sleep(2)
                if o==OTP[1]:
                    print("Password has been successfully!!! sent to your Email id, please Remember your Password for Future Reference\nPlease Login Again if you want to perform Another Task")   
                else:
                    print("Incorrect OTP")
            else:
                print("Sorry You have Entered Incorrect Choice\nPlease Login Again")
        else:
            print("User id is Incorrect\nPlease Login Again")
    elif choice==4:
        print("1)YES\n2)NO")
        choice=int(input("Are you Sure: "))
        if choice==1:
            print("Thankyou!! for transactions with Our ATM SYSTEM")
            print("Never share Your Password with Anyone, Bank will never ask your Password")
        elif choice==2:
            print("Sorry!! Your session has Expired You Need to Login again")
        else:
            print("You have Entered Incorrect Choice")
    else:
        print("You have Entered Incorrect Choice\nPlease Login Again")
else:
    print("\nOOPS! Incorrect Login details")
atm_mini_project.py
PrakulDashing/HacktoberFest2023