Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE PYTHON PROGRAMING. The Assignment: Professor Bob is a movie buff, but like most professors he is absent-minded. He has an old text file movieData.txt

USE PYTHON PROGRAMING.

image text in transcribed

The Assignment: Professor Bob is a movie buff, but like most professors he is absent-minded. He has an old text file movieData.txt which contains the names and year(s) a movie was made (and remade). A Tailor Made Man A Tale of Five Cities A Tale of Two Cities A Talent for Murder A Talk in the Dark A Tall Man Executes a Jig by Irving Layton Bob would like to be able to interactively search for all movies containing specified word(s) in the title or made during a specific year The program's main menu should contain the following options . start a new search - allows the user to enter one or more words in the title to search and/or year of the movie This should just report the number of movies that match (he might not want to see 100s of movie titles). Multiple search words ALL must appear in the titles found. refine the search - allows the user to enter one or more additional words to refine the search. This should also report the number of movies that match. display to the screen the results of the current search: complete movie titles and the year(s) they were made print the results of the current search to a user-specified text file . At the start of the program, you should create an empty ChainingDict dictionary and fill it by reading movie entries from the movieData.txt file. Each dictionary entry will have a word for its key and a lst of movie entries containing that word in their titles. (There are 34083 unique words if you split the movie titles on white-space, so having 40000 slots in the hash table should be about right, .e., ChainingDict (40000).) NOTE MAC USERS: You'll want to open the movieData.txt file using movieFile-open ('movieData.txt',', encoding-'utf8 On a new search, use the longest word to search the dictionary for a list of movies. Use this list to find the matches if other search words were entered. Design in Advance: Part of your grade will be determined by how well your code is split into functions. Thinking about design before coding can really help here Implement AND fully test your movie-search program. Part of your grade will be determined by how robust your program runs (i.e., does not crash) and how user-friend/intuitive your program is to use

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago