Placement 2025 Scholarship: Your Future Starts Here | 6 Guaranteed Job Interviews | Limited to 100 seats. Apply Now

00D 00H 00M 00S

Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

All Courses

All Courses

logo

CHOOSE A CATEGORY

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

Top Job Leading Courses

Automotive

CFD

FEA

Design

MBD

Med Tech

Courses by Software

Design

Solver

Automation

Vehicle Dynamics

CFD Solver

Preprocessor

Courses by Semester

First Year

Second Year

Third Year

Fourth Year

Courses by Domain

Automotive

CFD

Design

FEA

Tool-focused Courses

Design

Solver

Automation

Preprocessor

CFD Solver

Vehicle Dynamics

Machine learning

Machine Learning and AI

POPULAR COURSES

coursePost Graduate Program in Hybrid Electric Vehicle Design and Analysis
coursePost Graduate Program in Computational Fluid Dynamics
coursePost Graduate Program in CAD
coursePost Graduate Program in CAE
coursePost Graduate Program in Manufacturing Design
coursePost Graduate Program in Computational Design and Pre-processing
coursePost Graduate Program in Complete Passenger Car Design & Product Development
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. ANANYA RAO/
  3. Project 1 - English Dictionary App & Library Book Management System

Project 1 - English Dictionary App & Library Book Management System

English Dictionary App import pickle # Initialize an empty dictionarydictionary = {} # Open the file in write mode and serialize the dictionarywith open("words.txt", "wb") as file: pickle.dump(dictionary, file) print("words.txt file created successfully!") ---------------------------------------------- import pickle def…

    • ANANYA RAO

      updated on 23 May 2023

    English Dictionary App

    import pickle

    # Initialize an empty dictionary
    dictionary = {}

    # Open the file in write mode and serialize the dictionary
    with open("words.txt", "wb") as file:
    pickle.dump(dictionary, file)

    print("words.txt file created successfully!")

    ----------------------------------------------

    import pickle

    def add_word():
    word = input("Enter the word: ")
    meaning = input("Enter the meaning: ")
    with open("words.txt", "rb") as file:
    dictionary = pickle.load(file)
    dictionary[word] = meaning
    with open("words.txt", "wb") as file:
    pickle.dump(dictionary, file)
    print("Word and meaning added successfully!")

    def find_meaning():
    word = input("Enter the word: ")
    with open("words.txt", "rb") as file:
    dictionary = pickle.load(file)
    if word in dictionary:
    print(f"Meaning: {dictionary[word]}")
    else:
    print("Meaning not found.")

    def update_word():
    word = input("Enter the word to update: ")
    with open("words.txt", "rb") as file:
    dictionary = pickle.load(file)
    if word in dictionary:
    new_meaning = input("Enter the new meaning: ")
    dictionary[word] = new_meaning
    with open("words.txt", "wb") as file:
    pickle.dump(dictionary, file)
    print("Word meaning updated successfully!")
    else:
    print("Word not found.")

    def main_menu():
    while True:
    print("\nMain Menu\n")
    print("1. Add a new word")
    print("2. Find the meaning")
    print("3. Update a word")
    print("4. Exit\n")
    choice = input("Enter Choice: ")
    if choice == "1":
    add_word()
    elif choice == "2":
    find_meaning()
    elif choice == "3":
    update_word()
    elif choice == "4":
    print("Exiting...")
    break
    else:
    print("Invalid choice. Please try again.")

    main_menu()

     

     

    Library Book Management System

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

    root = Tk()
    root.title('A Library Application!')


    def Database():
    global conn, cursor
    conn = sqlite3.connect('books.db')
    cursor = conn.cursor()
    cursor.execute(
    """CREATE TABLE IF NOT EXISTS books(id INTEGER PRIMARY KEY AUTOINCREMENT,title TEXT,author TEXT,year INTEGER,isbn INTEGER)""")


    def Add():
    if BOOKTITLE.get() == "" or AUTHOR.get() == "" or YEAR.get() == "" or ISBN.get() == "":
    txt_result.config(text="Please enter all the fields", fg='red')
    else:
    Database()
    cursor.execute("INSERT INTO books (title, author, year, isbn) VALUES (?, ?, ?, ?)",
    (BOOKTITLE.get(), AUTHOR.get(), YEAR.get(), ISBN.get()))
    conn.commit()
    BOOKTITLE.set("")
    AUTHOR.set("")
    YEAR.set("")
    ISBN.set("")
    cursor.close()
    conn.close()
    txt_result.config(text="Record Inserted", fg='green')


    def Display():
    tree.delete(*tree.get_children())
    Database()
    cursor.execute('SELECT * FROM books ORDER BY title ASC')
    fetch = cursor.fetchall()
    for data in fetch:
    tree.insert('', 'end', values=(data[1], data[2], data[3], data[4]))
    cursor.close()
    txt_result.config(text="Successfully fetched data", fg='black')

     


    def Issue():
    selected_item = tree.selection()
    if not selected_item:
    txt_result.config(text="Please select a book", fg='red')
    else:
    book_info = tree.item(selected_item)['values']
    book_title = book_info[0]
    messagebox.showinfo("Issue Book", f"Book '{book_title}' issued successfully")


    def Delete():
    selected_item = tree.selection()
    if not selected_item:
    txt_result.config(text="Please select a book", fg='red')
    else:
    result = messagebox.askquestion('Delete Book', 'Are you sure you want to delete this book?', icon='warning')
    if result == 'yes':
    book_info = tree.item(selected_item)['values']
    book_title = book_info[0]
    Database()
    cursor.execute("DELETE FROM books WHERE title=?", (book_title,))
    conn.commit()
    cursor.close()
    conn.close()
    tree.delete(selected_item)
    txt_result.config(text="Book deleted successfully", fg='green')

     


    def Exit():
    result = messagebox.askquestion('Do you want to exit? (y/n)', icon='warning')
    if result == 'yes':
    root.destroy()
    exit()


    BOOKTITLE = StringVar()
    AUTHOR = StringVar()
    YEAR = StringVar()
    ISBN = StringVar()

    Top = Frame(root, width=900, height=50, bd=8, relief='raise')
    Top.pack(side=TOP)
    Left = Frame(root, width=300, height=500, bd=8, bg='red', relief='raise')
    Left.pack(side=LEFT)
    Right = Frame(root, width=600, height=500, bd=8, bg='yellow', relief='raise')
    Right.pack(side=RIGHT)

    Forms = Frame(Left, width=300, height=450)
    Forms.pack(side=TOP)

    Buttons = Frame(Left, width=300, height=100, bd=8, relief='raise')
    Buttons.pack(side=BOTTOM)


    # Create labels for book details
    txt_title = Label(Top, width=900, font=('arial', 24), text="...Library Management Application...")
    txt_title.pack()

    txt_title = Label(Forms, text="Booktitle:", font=('arial', 16), bd=15)
    txt_title.grid(row=0, sticky="e")
    txt_author = Label(Forms, text="Author:", font=('arial', 16), bd=15)
    txt_author.grid(row=1, sticky="e")
    txt_year = Label(Forms, text="Year:", font=('arial', 16), bd=15)
    txt_year.grid(row=2, sticky="e")
    txt_isbn = Label(Forms, text="ISBN:", font=('arial', 16), bd=15)
    txt_isbn.grid(row=3, sticky="e")
    txt_result = Label(Buttons)
    txt_result.pack(side=TOP)

     


    # entry fields
    booktitle = Entry(Forms, textvariable=BOOKTITLE, width=30)
    booktitle.grid(row=0, column=1)
    author = Entry(Forms, textvariable=AUTHOR, width=30)
    author.grid(row=1, column=1)
    year = Entry(Forms, textvariable=YEAR, width=30)
    year.grid(row=2, column=1)
    isbn = Entry(Forms, textvariable=ISBN, width=30)
    isbn.grid(row=3, column=1)


    # buttons
    btn_add = Button(Buttons, width=10, text="Add", command=Add)
    btn_add.pack(side=LEFT)
    btn_display = Button(Buttons, width=10, text="Display", command=Display)
    btn_display.pack(side=LEFT)
    btn_search = Button(Buttons, width=10, text="Search")
    btn_search.pack(side=LEFT)
    btn_delete = Button(Buttons, width=10, text="Delete", command=Delete)
    btn_delete.pack(side=LEFT)
    btn_issue = Button(Buttons, width=10, text="Issue", command=Issue)
    btn_issue.pack(side=LEFT)
    btn_exit = Button(Buttons, width=10, text="Exit", command=Exit)
    btn_exit.pack(side=LEFT)

    # list widget

    scrollbar_y = Scrollbar(Right, orient=VERTICAL)
    scrollbar_x = Scrollbar(Right, orient=HORIZONTAL)

    tree = ttk.Treeview(Right, columns=("title", "author", "year", "isbn"), yscrollcommand=scrollbar_y.set,
    xscrollcommand=scrollbar_x.set)

    scrollbar_y.config(command=tree.yview)
    scrollbar_y.pack(side=RIGHT, fill=Y)
    scrollbar_x.config(command=tree.xview)
    scrollbar_x.pack(side=BOTTOM, fill=X)
    tree.heading('title', text="Book Title", anchor=W)
    tree.heading('author', text="Author", anchor=W)
    tree.heading('year', text="Year", anchor=W)
    tree.heading('isbn', text="ISBN", anchor=W)

    tree.column('#0', stretch=NO, minwidth=0, width=80)
    tree.column('#1', stretch=NO, minwidth=0, width=80)
    tree.column('#2', stretch=NO, minwidth=0, width=80)
    tree.column('#3', stretch=NO, minwidth=0, width=80)
    tree.pack()

    # Initialization
    if __name__ == '__main__':
    Database()
    root.mainloop()

    Leave a comment

    Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.

    Please  login to add a comment

    Other comments...

    No comments yet!
    Be the first to add a comment

    Read more Projects by ANANYA RAO (9)

    Project 2 - EDA on Vehicle Insurance Customer Data

    Objective:

    Project 2 - EDA on Vehicle Insurance Customer Data The "Project 2 - EDA on Vehicle Insurance Customer Data" is an exploratory data analysis project focused on analyzing and gaining insights from a dataset containing customer data in the vehicle insurance domain. The objective of this project is to explore and understand…

    calendar

    25 May 2023 05:26 PM IST

      Read more

      Project 1 - English Dictionary App & Library Book Management System

      Objective:

      English Dictionary App import pickle # Initialize an empty dictionarydictionary = {} # Open the file in write mode and serialize the dictionarywith open("words.txt", "wb") as file: pickle.dump(dictionary, file) print("words.txt file created successfully!") ---------------------------------------------- import pickle def…

      calendar

      23 May 2023 01:45 PM IST

        Read more

        Project 2 - Gender Bias in Science and Technical field

        Objective:

        Title: Literacy Rate in Tamilnadu

        calendar

        23 Mar 2023 07:38 AM IST

          Read more

          Project 1 - Analyzing the Education trends in Tamilnadu

          Objective:

          Analyzing the Education trends in Tamilnadu The dashboard : -A pie graph of women inBiological ScientistsChemists & Materials ScientistsComputer & Mathematical OccupationsEngineers & Architects -The trend of percent women graduating in Computer science and Engineering from 2000-2015Should be in text after the…

          calendar

          21 Mar 2023 08:28 AM IST

            Read more

            Schedule a counselling session

            Please enter your name
            Please enter a valid email
            Please enter a valid number

            Related Courses

            coursecard

            Design loads considered on bridges

            Recently launched

            10 Hours of Content

            coursecard

            Design of Steel Superstructure in Bridges

            Recently launched

            16 Hours of Content

            coursecard

            Design for Manufacturability (DFM)

            Recently launched

            11 Hours of Content

            coursecard

            CATIA for Medical Product Design

            Recently launched

            5 Hours of Content

            coursecardcoursetype

            Accelerated Career Program in Embedded Systems (On-Campus) Courseware Partner: IT-ITes SSC nasscom

            Recently launched

            0 Hours of Content

            Schedule a counselling session

            Please enter your name
            Please enter a valid email
            Please enter a valid number

            logo

            Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.

            https://d27yxarlh48w6q.cloudfront.net/web/v1/images/facebook.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/insta.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/twitter.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/youtube.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/linkedin.svg

            Our Company

            News & EventsBlogCareersGrievance RedressalSkill-Lync ReviewsTermsPrivacy PolicyBecome an Affiliate
            map
            EpowerX Learning Technologies Pvt Ltd.
            4th Floor, BLOCK-B, Velachery - Tambaram Main Rd, Ram Nagar South, Madipakkam, Chennai, Tamil Nadu 600042.
            mail
            info@skill-lync.com
            mail
            ITgrievance@skill-lync.com

            Top Individual Courses

            Computational Combustion Using Python and CanteraIntroduction to Physical Modeling using SimscapeIntroduction to Structural Analysis using ANSYS WorkbenchIntroduction to Structural Analysis using ANSYS Workbench

            Top PG Programs

            Post Graduate Program in Hybrid Electric Vehicle Design and AnalysisPost Graduate Program in Computational Fluid DynamicsPost Graduate Program in CADPost Graduate Program in Electric Vehicle Design & Development

            Skill-Lync Plus

            Executive Program in Electric Vehicle Embedded SoftwareExecutive Program in Electric Vehicle DesignExecutive Program in Cybersecurity

            Trending Blogs

            Heat Transfer Principles in Energy-Efficient Refrigerators and Air Conditioners Advanced Modeling and Result Visualization in Simscape Exploring Simulink and Library Browser in Simscape Advanced Simulink Tools and Libraries in SimscapeExploring Simulink Basics in Simscape

            © 2025 Skill-Lync Inc. All Rights Reserved.

                        Do You Want To Showcase Your Technical Skills?
                        Sign-Up for our projects.