question archive You are required to create a program in Python of sufficient complexity covering most of the programming techniques explored to this point in the module (chapters 1 to 13; chapter 14 is optional for the project)
Subject:Computer SciencePrice:0 Bought3
You are required to create a program in Python of sufficient complexity covering most of the
programming techniques explored to this point in the module (chapters 1 to 13; chapter 14 is optional
for the project). Your notebook will be assessed for plagiarism.
The assignment is to design a Python program, implemented in a Jupyter Notebook to enable
a user to look up and receive information about movies. There are two options for how this
should be implemented. Select only one of the following options:
a) Open Movie Database API
Access movie information from the Open Movie Database (http://www.omdbapi.com) using
the OMDB API. The OMDB API is a RESTful web service to obtain movie information from
this database and can be interacted with through Python. The project requires that you
investigate and understand how to interact with the OMDB RESTful API. In your notebook
you need to explain what a RESTful API is and how interaction takes place between the
program and this service. Before working with this API and designing your program, you need
to spend some time researching, firstly, what an API is, secondly, how to interact with an API
through Python and, thirdly, how to use this API and handle the responses that it provides.
On the page linked above click on the API key button in the menu bar. Select the free option
and enter the required details. You should then receive a verification email within a minute
or two (this email may arrive in your junk folder) which contains:
- Your API key (which will be needed to make any API requests)
- An example of a request with your key
- A link to activate the key (you will need to do this first before you can use your key)
PyPi provides a useful wrapper for accessing the API: https://pypi.org/project/omdb/
It is strongly recommended that you browse this page and understand how to interact with
the service. This is all explained at the link, along with examples of how to interact from
python to the service. In your program, consider how dictionaries will enable you to work
with the data returned in JSON format from the API.To install a library from PyPi using pip in
a Jupyter Notebook run the following code in a cell:
import sys
!{sys.executable} -m pip install --upgrade pip
!{sys.executable} -m pip install omdb
b) Using IMDB and BeautifulSoup for web scraping
Access movie information from IMDB using web scraping with the BeautifulSoup module.
Irrespective of whether you select option A or option B, the program you create should
present a user with options and instructions for how interaction should take place. At a
minimum, the user should be able to provide a Movie title to your program. It should
determine if this movie exists or not and, if it does not, respond accordingly. If a legitimate
movie has been provided, at a minimum, the program should provide the user with
information about this movie (i.e., name, genre, release date, runtime, director, awards, etc.).
In addition to this, the program should write this information to a .txt file in a manner that
can later be read in when required. When the program starts, it should display the titles of
the movies previously looked up and give the user the option to either look up a new movie
or view the information for one of the previously looked up movies from the information
stored in the textfile.
In addition to these basic features, you are expected to write a comprehensive program that
is robust against potential errors encountered and makes appropriate use of the code
structures covered in this module. You need to be able handle unexpected inputs from the
user and the service you are calling for instance. How you implement this functionality is up
to you. Creativity and outside-of-the-box thinking is rewarded. In addition to employing the
concepts covered in class, you need to demonstrate your mastery of the content through not
only producing the minimum applications specified, but also through incorporating extra
features and components to your program. Extra marks are awarded for use of Object-
Oriented design features.
Section B: 40 Marks
The second section of this project requires you to document your program. This should be
conducted within your Jupyter Notebook using Markdown. In essence, your Jupyter notebook
should read as a complete project, introducing your user to your program, demonstrating
how it works, and documenting your key design decisions. How you structure your notebook
is up to you. However, it should be clear which code is your final code for Section A, and
which code is demonstrating particular features in your documentation.
You are expected to document key aspects of the logic of your solutions. This involves
explaining particular sections of code in the program and describing why things were done in
a particular way and how the program works together. Additionally, you need to include a
section where you provide an overview of how you collected the necessary data for your
program. If you selected option A, this will involve describing what an API is and informing
the reader about key details to do with the OMDB API and how it is interacted with. If you
selected option B, this will involve describing what web scraping is and informing the reader
about key details to do with how you collected and parsed IMDB.
Your documentation also needs to include a retrospective section, where you reflect on
problems encountered and how you went about solving those problems. In addition to this,
such a retrospective should reflect on what improvements could be made to your program
and what you learned from the experience. Finally, you need to include help documentation
explaining how your program should be used.
Assessment Criteria:
Section A - Implementation:
Your program will be assessed based on the following criteria:
• The program must work. i.e., It must run without crashing or throwing errors, even
when unexpected input might be encountered. In this regard, your program will be
tested to determine how it handles various input situations.
• Your program must be sufficiently complex.
• Most code structures covered in this module should be included in the program.
• Sufficient and appropriate commenting is important.
• It must connect to the API using a Python Library (for option A), it must parse the
data with BeautifulSoup (for option B)
All the required features will be assessed.
• Extra features included over and above the minimum requirements are awarded
marks.
Section B - Design documentation:
Your documentation will be assessed based on the following criteria:
• The layout and design must be neat and professional.
• The program description must be complete and thorough.
• The explanation of the code logic must be in-depth and accurate.
• The explanation of the data collection procedures must be accurate and detailed.
• The retrospective should go into detail about problems and solutions you
encountered.
• The help document must cover all possible use and error cases.
Submission Information:
For this project you must upload a .zip file containing a complete Jupyter Notebook saved in the .ipynb
format along with any txt files or style files you use. This means that you should not upload a .html
file or a PDF file.