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...
-
Why are standards so important in many high-tech industries? What are the competitive implications of this?
-
Casey's Construction, Inc.'s checkbook lists the following: Caseys Construction, Inc.s September bank statement shows the following: Requirements 1. Prepare Caseys Construction, Inc.s bank...
-
Explain how the control variate technique is implemented.
-
The road system around the hotel complex on International Drive (node 1) to Disney World (node 11) in Orlando, Florida, is shown in the network of Figure. The numbers by the nodes represent the...
-
The wave function associated with standing waves established in a 5.00 m long light-weight rope is y = 0.00300 sin(x)cos(110t) where x and y are in meters and t is in seconds. (a) How many...
-
Write Structured Query Language (SQL) code to create a table structure for each of the relation schemas. Each table must indicate primary key, and foreign key(s), if applicable. Include as well the...
-
Formal notification that Congress has enacted an appropriation for an agency requires recognition by the agency in a. budgetary accounts only. b. proprietary accounts only. c. both budgetary and...
-
Which of the following is not a required category of information included in the statistical section of a CAFR? a. Financial trends information. b. Revenue capacity information. c. Debt capacity...
-
All of the following information would be included in the financial section of a CAFR except the a. letter of transmittal. b. Management's Discussion and Analysis. c. independent auditor's report. d....
-
The Statement of Revenues, Expenditures, and Changes in Fund Balance does not report a. interest on long-term debt. b. charges for services. c. transfers. d. depreciation.
-
In which of the following situations would blending be required under GAAP? a. The primary government appoints the voting majority of the component unit governing body, can impose its will on the...
-
A voltmeter with a range of 0 to 100v reads 2V when the leads are shorted together. the manufacture claims an accuracy of + and -4% of full scale. estimate the maximum error when reading a voltage of...
-
Find the work done in pumping all the oil (density S = 50 pounds per cubic foot) over the edge of a cylindrical tank that stands on one of its bases. Assume that the radius of the base is 4 feet, the...
-
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.
-
The statement of financial position of A. Barnes and C. Darwin at 31 March 2015 is as follows: The partners share profits and losses: Barnes three-fifths and Darwin two-fifths. At the date of the...
-
Use the Ritz variational method for the harmonic oscillator, with trial wave functions \(\psi_{1}(x)=\) \(e^{-y^{2} / 2}, \psi_{2}(x)=e^{-y^{2}}, \psi_{3}(x)=e^{-2 y^{2}}\), where \(y=x \sqrt{m...
-
Consider a two-level system, with basis \(|1angle,|2angle\), and in this basis, a Hamiltonian with elements \(\left(\begin{array}{ll}1 & 1 \\ 1 & 1\end{array} ight)\). Use the first form of the...
Study smarter with the SolutionInn App