Complete the code to create a dictionary representing a person with name and age.
person = {'name': 'Alice', 'age': [1]The age should be a number without quotes to represent an integer value.
Complete the code to convert a dictionary to a JSON string.
import json person = {'name': 'Bob', 'age': 25} json_str = json.[1](person)
json.loads() which is for parsing JSON strings.Use json.dumps() to convert a Python dictionary to a JSON string.
Fix the error in the code to parse a JSON string into a Python dictionary.
import json json_str = '{"city": "Paris", "population": 2148000}' data = json.[1](json_str)
json.load() which reads from a file, not a string.Use json.loads() to parse a JSON string into a Python dictionary.
Fill both blanks to create a dictionary of squares for numbers greater than 3.
squares = {x: x[1]2 for x in range(1, 6) if x [2] 3}% which is modulo, not exponentiation.< instead of >.Use ** for exponentiation and > to filter numbers greater than 3.
Fill all three blanks to create a filtered dictionary with uppercase keys and values greater than 10.
filtered = [1]: [2] for k, v in data.items() if v [3] 10}
k.lower() instead of uppercase.< instead of >.Use k.upper() to uppercase keys, keep values as v, and filter values greater than 10 with >.