Write a function that accepts a genre url and returns the genre name
Added by James J.
Step 1
The function will be named `get_genre_name`. Show more…
Show all steps
Your feedback will help us improve your experience
Nicole Smina and 59 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
REST API: Best TV Shows in Genre. Use the HTTP GET method to retrieve information about recent television shows. Query https://json.hackerrank.com/api/tvseries to find all the shows in a genre. The query result is paginated. To access additional pages, append ?page={num} to the URL where num is the page number. The response is a JSON object with the following 5 fields:
Nicole S.
An MP3 playlist containing several songs from five genres is set to shuffle. The following table shows the genre and the associated probability for the first song played. Does the table represent a probability distribution? Genre Probability Rock 0.302 Pop 0.290 Country 0.203 Jazz 0.123 Classical 0.090 a) Yes b) Can't be determined with the given information c) No
T. L.
Diego's titles aren't showing up on the page. He needs to format the track titles to be inserted correctly into the HTML. Use a for loop to update each of the track titles to have a <p> before the track name and a </p> after the track name. For example, "Sunshine Peak" should be "<p>Sunshine Peak</p>" after being updated. Start coding: Iterating through collections Read the instructions below to understand the request and requirements necessary for you to successfully complete this challenge. let trackTitles = [ "Sunshine Peak", "We're All Light", "Bring the Light", "Dancing through the Light", "Cold Light Generation", "Ray of Light", "The Inner Light", ]; Remember, you have all the skills needed to do this but if you need support - please reach out for help! Instructions: 1. Click on the Web Preview and notice the songs are not showing up. 2. Click the script.js file and follow the instructions to write the code to display the songs on the web page. 3. Click on the Web Preview to see the effects of your updates in the script.js file and verify that the images change. 4. Click on Run Tests when you think you've got a solution. Once the tests pass (they'll turn green), go ahead and submit the challenge. // Un-comment and complete the code below: // for(){ // trackTitles[i] = "<p>" + trackTitles[] + "</p>" // } // Do not change anything below here run(trackTitles);
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD