Question: Program that will parse out different portions of a String that contains information about a movie. Create a file called FirstLastMovie.py Requirements: In addition to
Program that will parse out different portions of a String that contains information about a movie.
Create a file called
FirstLastMovie.py Requirements:
In addition to main you must have a bunch of functions see below Each function will accept a String as the parameter. This String will contain all of the information about this movie as follows we will use Star Wars as an example:
Title:Star Wars,Released:Rating:PGPeople:Mark HamillHarrison FordCarrie FisherGeorge Lucas, Genre:ActionAdventureScience FictionFantasy
a Each section is separated by a comma. There are no spaces around the commas.
b There will be a title, a released year, a rating, a list of notable people, and a list of genres.
i Each section will start with the name of the section exactly as listed above, followed by a colon, followed by the values
ii Please note that there is no guarantee as to the order of these sections. For example, the rating may come first, followed by the genres, then the title, then the people, and finally the released year.
c There is no guarantee as to the length of any section. For example, the rating may be PG or R or possibly three characters or more.
d The people will be separated by a dash no spaces around the dash This will always be a list of the top stars, and the director will always appear last. You may assume that there will be at least two people in this section.
e The genres will also be separated by a dash no spaces You may assume that there will be at least one genre listed.
f You may assume that there will not be any extra commas or dashes. Those characters will be reserved for separating items in the String.
You will need the following functions, all must be named exactly as specified:
a getTitlemovielnfo
i This will return the title return type: string
b getReleasedYearmovielnfo
i This will return the released year return type: int
c getRatingmovielnfo
i This will return the rating return type: string
d getStarsmovielnfo
i This will return a tuple of stars. Please note that this does not include the directorreturn type: tuple
e getDirectormovielnfo
i This will return the director return type: string
f getGenresmovielnfo
i This will return a tuple of genres return type: tuple
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
