Complete the code to retrieve the security score from Azure Security Center.
security_score = client.security_scores.get('[1]')
The latest parameter retrieves the most recent security score.
Complete the code to list all security recommendations for a subscription.
recommendations = client.security_recommendations.list('[1]')
The subscriptionId is required to list recommendations for that subscription.
Fix the error in the code to correctly fetch security recommendations with filters.
filtered_recommendations = client.security_recommendations.list(filter='[1]')
Azure uses OData filter syntax where eq means equals.
Fill both blanks to create a dictionary of recommendation names and their states.
rec_states = {rec.[1]: rec.[2] for rec in recommendations}Use name as the key and state as the value to map recommendations to their states.
Fill all three blanks to filter and count active high severity recommendations.
active_high = [rec for rec in recommendations if rec.[1] == '[2]' and rec.[3] == 'Active'] count = len(active_high)
Filter by severity equal to High and state equal to 'Active' to get the count.
