write this code in Python, making sure the output matches exactly with proper commenting and ashering to
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In this program, you will create a simple Music Recommendation System. You will ask the user several questions about what kind of music they are interested in and then suggest what they should try listening to. In order to provide a targeted recommendation, each set of options provided is dependent upon the user's answer to the prior question. You must use three levels of questions and give the user three choices for each question. If this is unclear, look carefully at the sample runs below. In each case, there are three questions before the user is given a recommendation and each question has three choices. Also note that the second and third questions are different in each run as they are dependent on how the user responds to the first question. To restate the above in more technical terms, you must use nested if statements in this program. The second level options must be "inside" the if statements of the top level and the same for the third level. In my sample runs, the three "levels" of questions (genre, sub- genre and sub-sub-genre) yield a band recommendation. However, you could use genre, sub-genre and band that yields a song recommendation or some other aspects of music such as instrumentation or vintage. In other words, you can choose all the options for the questions and the answers. If the options are long, you may want to allow the user to enter a shortened response, by putting the allowable words in parentheses (see the sample runs below as a guideline for this). Please note that you must allow the user to enter their responses with upper case, lower case or mixed case characters. For example, if one of the options is pop, the user might enter Pop or POP or even pop and they should all be treated the same way. If the user enters something other than the allowable choices, you should display the error message shown below and terminate the program. Use of lists (structures that use []) and dictionaries (structures that use {}) are not permitted in this assignment. In this program, you will create a simple Music Recommendation System. You will ask the user several questions about what kind of music they are interested in and then suggest what they should try listening to. In order to provide a targeted recommendation, each set of options provided is dependent upon the user's answer to the prior question. You must use three levels of questions and give the user three choices for each question. If this is unclear, look carefully at the sample runs below. In each case, there are three questions before the user is given a recommendation and each question has three choices. Also note that the second and third questions are different in each run as they are dependent on how the user responds to the first question. To restate the above in more technical terms, you must use nested if statements in this program. The second level options must be "inside" the if statements of the top level and the same for the third level. In my sample runs, the three "levels" of questions (genre, sub- genre and sub-sub-genre) yield a band recommendation. However, you could use genre, sub-genre and band that yields a song recommendation or some other aspects of music such as instrumentation or vintage. In other words, you can choose all the options for the questions and the answers. If the options are long, you may want to allow the user to enter a shortened response, by putting the allowable words in parentheses (see the sample runs below as a guideline for this). Please note that you must allow the user to enter their responses with upper case, lower case or mixed case characters. For example, if one of the options is pop, the user might enter Pop or POP or even pop and they should all be treated the same way. If the user enters something other than the allowable choices, you should display the error message shown below and terminate the program. Use of lists (structures that use []) and dictionaries (structures that use {}) are not permitted in this assignment.
Expert Answer:
Related Book For
Practicing Statistics Guided Investigations For The Second Course
ISBN: 9780321586018
1st Edition
Authors: Shonda Kuiper, Jeff Sklar
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Marks 1. Find the limits, if they exist. If a limit does not exist, check whether the function approaches +00 x2 + 2x - 15 (5) (a) lim x-3 x2-4x +3 x2 - 4 (5) (b) lim x2 x4 - 16 Carol Ferland CF...
-
1. Why did Holiday Inn's business model and strategies changed over time? 2. How has competition changed the strategies behind the InterContinental Hotels Group's business model over? 3. In what ways...
-
How are trade deficits and trade surpluses automatically eliminated under the gold standard?
-
Explain the reasons for significant changes in projects.
-
Hal Thomas, a 25-year-old college graduate, wishes to retire at age 65. To supplement other sources of retirement income, he can deposit $2,000 each year into a tax-deferred individual retirement...
-
3) Consider a system with 4 resources (A, B, C, D) in quantity (5, 3, 3, 3). The Banker's Algorithm is used to allocate resources and it has the following SAFE state: Available: A B C D 1 2 0 1...
-
1. The CEO has asked you to help her decide whether to use LIFO or FIFO for inventory casting. Compute the gross profit earned by the company for both LIFO and FIFO 2 The CEO's bonus is calculated...
-
On December 6, 2017, Norwood Co., an office equipment supplier, sold a copier for cash of $24,000 (cost $15,400) with a two-year parts and labour warranty. Based on prior experience, Norwood expects...
-
The use of the term "voting with your feet" is related, but also different across the "Here's how Flint went from boom town to nation's highest poverty rate", "Yvette McGee Brown on refusing to rise...
-
Comment on Russ Roberts' video on "The Wonderful Loaf". 1. Are you surprised that we need on central direction form government for the market to work? Think about your local grocery store. You don't...
-
1.) List and briefly characterize the main tools of government intervention in the international trade. Which is the most efficient and for whom? Reference your sources using the Harvard referencing...
-
2 I Multiply the polynomials. (x+5) (x - 7x+4) b d Answer: ax + cx + ex + g
-
Identify the type(s) of symmetry: x 2 + xy +y 2 = 0.
-
A CPA has been asked by a client to evaluate various commercial service bureaus and recommend a particular service bureau for processing the clients accounting records. Several partners in the CPAs...
-
Why are stocks usually more risky than bonds?
-
Data set: ChiSq a. Take a simple random sample of size n = 40 from the ChiSq data. Create a bootstrap distribution of the median by taking 1000 resamples (with replacement). Describe the shape of the...
-
Use statistical software to conduct a two- sample t-test (assuming equal variances) and find the p-value corresponding to this statistic. In addition, use software to calculate a 95% confidence...
-
When there are only two levels (with equal sample sizes) being compared in an F-test, explain why 1 = 2.
-
What is thermodynamics?
-
An astronaut weighs \(800 \mathrm{~N}\) on the earth's surface where the acceleration of gravity is \(g=9.83 \mathrm{~m} / \mathrm{s}^{2}\). The mass and the radius of the moon are \(7.4 \times...
-
Explain the scope and limitations of thermodynamics.
Study smarter with the SolutionInn App