Question: use google cloud platform. flask templates. show all codes The objective of this exercise is to practice the use of templates in Flask. Create a

use google cloud platform. flask templates. show all codes
The objective of this exercise is to practice the use of templates in Flask. Create a Flask application that defines a single route named population that defines a dictionary containing the population of several cities of your choice. Here's an example of a dictionary: cities = { 'NYC' : 8500000, 'LA' : 4000000, 'Bogota': 7400000} When the route is accessed, the application must send the dictionary to a template called population.html which will display the contents of the dictionary in an HMTL table. City Population NYC 8500000 LA 4000000 Bogota 7400000 In order to generate this output, the template file must iterate through the elements of the dictionary. Here's an example that outputs the entries of a dictionary d, one perline (you'll need to modify this to incorporate an HTML table): {% for key, value in d. items() %}
City: {{key}}, Population: {{value} }
{% endfor %}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
