Concept explainers
Please explain how to get the genre list to filter and how to associate the i to the title of the movie and display it on the finish screen. You can press to view code on the top right of the screen and you can edit it by creating a remix. Thank you for you help it is due today at 12.
var nameList = getColumn("Netflix Content", "Title");
var typeList = getColumn("Netflix Content", "Type");
var typeSelection;
onEvent("typeDropdown", "click", function( ) {
typeSelection = getText("typeDropdown");
});
onEvent("startButton", "click", function( ) {
setScreen("typeScreen");
console.log("in STARTBUTTON typeSelection = "+typeSelection);
});
onEvent("toRatingButton", "click", function( ) {
setScreen("finishScreen");
console.log("typeSelection = "+typeSelection);
// for (var i = 0; i < nameList.length; i++) {
for (var i = 0; i < 25; i++) {
console.log(((" i="+i)+" "+typeSelection)+" "+ratingSelection+" "+genreSelection+"--"+typeList[i]+" "+ratingList[i]+" "+genreList[i]);
// if ((typeList[i] == typeSelection) && ((ratingList[i] == ratingSelection)) && ((genreList[i] == genreSelection)) ){
if ( (typeList[i] == typeSelection) && (ratingList[i] == ratingSelection) ){
// appendItem(filteredNameList, typeList[i]);
console.log("ADDED i="+i+" "+typeList[i]+" "+ratingList[i]+" "+genreList[i]);
appendItem(filteredTypeList, typeList[i]);
appendItem(filteredGenreList, genreList[i]);
appendItem(filteredRatingList, ratingList[i]);
// appendItem(filteredTypeList, typeList);
}
}
});
onEvent("retryButton", "click", function( ) {
setScreen("homeScreen");
console.log("filteredNameList = "+filteredNameList);
setProperty("resultOutput", "text", "Your film is: " + filteredNameList);
});
var filteredNameList = [];
var filteredTypeList = [];
var filteredGenreList = [];
var filteredRatingList = [];
//function updateScreen() {
// var index = randomNumber(0, filteredNameList.length - 1);
//}
onEvent("typeDropdown", "change", function( ) {
typeSelection = getText("typeDropdown");
console.log("Selected option: " + typeSelection);
});
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- The following code will create a histogram of a pandas series, series_data, and align the bin edges with the horizontal tick marks. count, bin_edges = np.histogram(series_data) series_data.plot(kind='hist', xticks = count, bin_edges) Select one: O True Falsearrow_forwardQ3:Create a series called 'directors' that contains each director's name and his or her average rating. Print out the type of your variable.arrow_forwarddo this in a visual studio code (php), correctly. Add below a list that displays the top ten dogs in the show. This is defined as the ten dogs who have the highest average scores, provided they have entered more than one event. Display just the dog’s name, breed, and average score. Next to each dog, add the name of the owner and the owner’s email address. The email address link should start up the default email application to send an email to the owner. The owner’s name should link to a second page containing the owner’s contact details.arrow_forward
- Change the code so it loads the image from a folder named img instead of a url. .bgimg {background-position: center;background-size: cover;background-image: url("/w3images/coffeehouse.jpg");min-height: 75%;}arrow_forwardHow would you create a new span element and assign the reference to a variable named x? var x = item.createElement("s"); var x = document.create("span"); var x = document.createElement("span"); var x = document.createElement("s")arrow_forwardCreate a vector x which ranges in values from -180 to 180 in steps of 10. Then let y = x. These values are in degrees. Find a variable z = cosd(x)’*sind(y); Use surf to plot the surface plot, and label using commands xlabel, ylabel, and zlabel. Add a title.arrow_forward
- Find the body:def get_line(board: str, dir: str, col_or_row: int) -> str: """Return the characters that make up the specified row, column, or diagonal from the given tic-tac-toe game board. >>> get_line(4, across, 2) XX >>> get_line(9, down, 3) OOO >>> get_line(4, down_diagonal) OO """arrow_forward"As per Bartleby rules, we can answer first 3 MCQ" there are 3 questions ,please answer all thanks !arrow_forwardHTML/CSS JAVASCRIPT please help me answer this question I will give you a good rating Thank you! Given the following word search application, which searches for words in paragraphs, modify it so that it Adds two spans tab within the HTML within the designated new "Illustate" text segments as shown below. Has a new click event which searches the occurrence of the word within all span tabs residing within the first div container , then highlights the text in the span tab which contains the word c) In the same routine, count the number of times ( using a global variable) that the word is found Within the object array loop for span tabs ( where the indexOf statement is located) and after all span tabs are highlighted, send that number to a new html element ( a div, h1, span, p choice is up to you). The count should be continually accumulated and should show the total number of times a word is found in a span tab for all user activated clicks of the search button for…arrow_forward
- Write a for-loop that will write to the HTML document the value of each element in the array called myArray. Note: You only need to write a for-loop. Code on the outside of the for-loop is not necessary as we will assume that myArray has been declared and initialized with a series of array elements.arrow_forwardCreate an autocomplete input element with an associated datalist that contains the days of the week.arrow_forwardEvent Listeners Return to the mas_register.js file in your editor. Directly below the initial comment section, insert an event listener for the window load event. Run an anonymous function in response to the event containing the following commands: Call the calcCart() function (which you will create shortly.) Create an onclick event handler for the regSubmit button that runs the sessionTest() function when the button is clicked. Create onblur event handlers for the input boxes with the ids: fnBox, lnBox, groupBox, mailBox, phoneBox, and banquetBox, running the calcCart() function in response to each event. Create an onchange event handler for the sessionBox selection list, running the calcCart() function when the selection list is changed. Create an onclick event handler for the mediaCB check box, running the calcCart() function in response. JavaScript Functions Create the sessionTest() function. The purpose of this function is to provide a validation test for the conference session…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education