Question 4
Consider the following Python code snippet.
Filename: code.py
from string import Template as string_templatefrom jinja2 import Template as jinja_template
template1 = string_template('Hello $name, welcome to $city!')template2 = jinja_template('{{product}} costs {{price}}')
result1 = template1.substitute(name='Alice')result2 = template1.substitute(name='Alice', city='Boston', state='Massachusetts')result3 = template2.render({"product": "laptop"})result4 = template2.render({"product": "laptop", "price": "45000", "currency": "rupees"})
print(result1)print(result2)print(result3)print(result4)Which of the following statements will throw a key error?