Question: Ok, so I'm writing the HTML for a web app that takes a list of movies and randomly selects one from the list. First part

 Ok, so I'm writing the HTML for a web app that

Ok, so I'm writing the HTML for a web app that takes a list of movies and randomly selects one from the list.

First part of the page displays "Movie of the day" and then displays the name of the movie (which I have done correctly). Now the problem is to get the second part of the web app, directly underneath the first part, to display "Tomorrow's movie" and generate another random movie from the list. The code shown in the picture is what I initially thought what was correct. ALL OF THIS IS WRITTEN UNDER THE INDEX FUNCTION. USING PYTHON AS WELL!

I know it's incorrect, and i just need help to get the code correct. Thanks in advance.

1 from flask import Flask 2| import random app Flask(-name-) 6 app.configl'DEBUG'] True # displays runt ime errors in the browser, too 8 Gapp.route("") 10 def index(): # choose a movie by invoking our new function movie get_random_movie) 12 13 14 15 16 17 18 19 20 # build the response string content "1>Movie of the Day" content "ul>" content"

  • " +movie+"
  • " content"" return content movie

    Tomorrow's movie += "
      " movie +-"cli>" + movie movie "
    " Movie

    " 23 24 25 26 27 28 29 30 31 32 + " return movie get-random, movie(): movies ['The Thing','Prometheus', 'Childs Play', 'Moon', '28 Days Later'] random_movie random.choice(movies) return random_movie def

    Step by Step Solution

    There are 3 Steps involved in it

    1 Expert Approved Answer
    Step: 1 Unlock blur-text-image
    Question Has Been Solved by an Expert!

    Get step-by-step solutions from verified subject matter experts

    Step: 2 Unlock
    Step: 3 Unlock

    Students Have Also Explored These Related Databases Questions!