Creating the Table

import sqlite3 

def create_connection(db): 
    connection = None
    try: 
        connection = sqlite3.connect(db)
        return connection 
    except Error as e: 
        print(e)
    return connection 

def create_table(connection, createTblSql): 
    try: 
        cursor = connection.cursor()
        cursor.execute(createTblSql)
    except Error as e: 
        print(e)

def main(): 
    database = 'instance/movies.db'

    createTblSql = """ CREATE TABLE IF NOT EXISTS movies (
                                        _id integer PRIMARY KEY,
                                        _title text NOT NULL,
                                        _company text NOT NULL,
                                        _character text NOT NULL,
                                        _rottentomatoes text NOT NULL
                                    ); """
    connection = create_connection(database)

    # create animated movies table
    if connection is not None:
        create_table(connection, createTblSql)
    else:
        print('Connection Error')


if __name__ == '__main__':
    main()

Create

def create():
    database = 'instance/movies.db'
    title = input("Enter the movie title")
    company = input("Enter movie company name")
    character = input("Enter main character name")
    rottentomatoes = input("Enter rottentomatoes of movie")

    # Connecting to the database, create cursor to execute the SQL command
    connection = sqlite3.connect(database)
    cursor = connection.cursor()

    try:
        # Execute SQL to insert record in to db
        cursor.execute("INSERT INTO movies (_title, _company, _character, _rottentomatoes) VALUES (?, ?, ?, ?)", (title, company, character, rottentomatoes))
        # Commit the changes
        connection.commit()
        print(f"New movie with {title} is added.")
                
    except sqlite3.Error as error:
        print("Error while inserting record", error)

    # Closing cursor and connection
    cursor.close()
    connection.close()
    
create()
New movie with Snow White and the Seven Dwarfs is added.

Read

def read():

    database = 'instance/movies.db'
    # Connecting to the database, create cursor to execute the SQL command
    connection = sqlite3.connect(database)
    cursor = connection.cursor()
    
    # Fetch all the records from movies table
    results = cursor.execute('SELECT * FROM movies').fetchall()

    if len(results) != 0:
        for row in results:
            print(row)
    else:
        print("No movies")

    # Closing cursor and connection
    cursor.close()
    connection.close()

read()
(1, 'Moana', 'Disney', 'Moana', '95%')
(2, 'Kung Fu Panda', 'Dreamworks', 'Po', '87%')
(3, 'Inside Out', 'Disney', 'Joy', '98%')
(4, 'Coco', 'Disney', 'Miguel', '97%')
(5, 'Snow White and the Seven Dwarfs', 'Disney', 'Snow White', '97')

Update

import sqlite3

# updating rottentomatoes
def update():  
    
    database = 'instance/movies.db'
    movieId = input("Enter a movie id to update the rottentomatoes")
    rottentomatoes = input("Enter new rottentomatoes")

   # Connecting to the database, create cursor to execute the SQL command
    connection = sqlite3.connect(database)
    cursor = connection.cursor()

    try:
        # Updating rottentomatoes for the movie
        cursor.execute("UPDATE movies SET _rottentomatoes = ? WHERE _id = ?", (rottentomatoes, movieId))
        if cursor.rowcount != 0:
            print(f"rottentomatoes for the movie is updated to {rottentomatoes}")
            connection.commit()
        else:
            print(f"movie not found")
    except sqlite3.Error as error:
        print("Error occurred", error)
        
    # Closing cursor and connection
    cursor.close()
    connection.close()


update()
rottentomatoes for the movie is updated to 95%

Delete

import sqlite3

def delete():
    
    database = 'instance/movies.db'
    movieId = input("Enter movie id to delete")

    # Connecting to the database, create cursor to execute the SQL command
    connection = sqlite3.connect(database)
    cursor = connection.cursor()
    
    try:
        cursor.execute("DELETE FROM movies WHERE _id = ?", (movieId,))
        if cursor.rowcount == 0:
            print(f"{movieId} does not exist")
        else:
            print(f"Successfully deleted movie with id {movieId}")
        connection.commit()
    except sqlite3.Error as error:
        print("Error occurred: ", error)
        
    # Closing cursor and connection
    cursor.close()
    connection.close()

delete()
Successfully deleted movie with id 2

Menu

def menu():
    operation = input("Enter: (C)reate (R)ead (U)pdate or (D)elete")
    if operation.lower() == 'c':
        create()
    elif operation.lower() == 'r':
        read()
    elif operation.lower() == 'u':
        update()
    elif operation.lower() == 'd':
        delete()
    elif len(operation)==0: # Escape Key
        return
    else:
        print("Please enter c, r, u, or d") 
    menu() # recursion, repeat menu
try:
    menu() # start menu
except:
    print("Perform Jupyter 'Run All' prior to starting menu")
(1, 'Moana', 'Disney', 'Moana', '95%')
(2, 'Kung Fu Panda', 'Dreamworks', 'Po', '87%')
(3, 'Inside Out', 'Disney', 'Joy', '98%')
(4, 'Coco', 'Disney', 'Miguel', '97%')
(5, 'Snow White and the Seven Dwarfs', 'Disney', 'Snow White', '97%')