Search This Blog
Exploring the Wonders of Science, Technology, and Human Potential
Featured
- Get link
- X
- Other Apps
Python+SQL Project Job Application Manager
Make sure to make indentation correct
import sqlite3
from datetime import datetime
# Connect to SQLite database
conn = sqlite3.connect('job_tracker.db')
cursor = conn.cursor()
# Create Job Applications table if not exists
cursor.execute('''
CREATE TABLE IF NOT EXISTS job_applications (
id INTEGER PRIMARY KEY AUTOINCREMENT,
company TEXT NOT NULL,
position TEXT NOT NULL,
status TEXT NOT NULL,
application_date DATE NOT NULL,
interview_date DATE,
notes TEXT
)
''')
conn.commit()
# Function to add a job application
def add_application(company, position, status, application_date, interview_date=None, notes=None):
cursor.execute('''
INSERT INTO job_applications
(company, position, status, application_date, interview_date, notes)
VALUES (?, ?, ?, ?, ?, ?)
''', (company, position, status, application_date, interview_date, notes))
conn.commit()
print("Job application added successfully!")
# Function to view all job applications
def view_applications():
cursor.execute('SELECT * FROM job_applications')
applications = cursor.fetchall()
if not applications:
print("No job applications recorded yet.")
else:
print("ID\tCompany\t\tPosition\tStatus\tApplied Date\tInterview Date\tNotes")
for application in applications:
print(f"{application[0]}\t{application[1]}\t\t{application[2]}\t{application[3]}\t{application[4]}\t\t{application[5]}\t\t{application[6]}")
# User interface
while True:
# Display menu options
print("\n1. Add Job Application\n2. View Job Applications\n3. Exit")
# Get user choice
choice = input("Enter your choice (1/2/3): ")
# Perform actions based on user choice
if choice == '1':
# Gather information for a new job application
company = input("Enter company name: ")
position = input("Enter position applied for: ")
status = input("Enter application status: ")
application_date = datetime.now().date()
interview_date = input("Enter interview date (optional, press Enter if none): ")
notes = input("Enter any notes (optional, press Enter if none): ")
# Add the job application to the database
add_application(company, position, status, application_date, interview_date or None, notes or None)
elif choice == '2':
# View all recorded job applications
view_applications()
elif choice == '3':
# Exit the program
print("Exiting the Job Application Tracker. Goodbye!")
break
else:
# Handle invalid choices
print("Invalid choice. Please enter a valid option.")
- Get link
- X
- Other Apps
Popular Posts
What If India Loses this mindset of Reusing Things?
- Get link
- X
- Other Apps
Polar Bear is Suffering to Find Land Here is Why?
- Get link
- X
- Other Apps
Smarter move through technology revolution
- Get link
- X
- Other Apps
The Role of UX Design in Evolving Technology
- Get link
- X
- Other Apps
Comments
Post a Comment