Complete the code to calculate the Click-Through Rate (CTR) given clicks and impressions.
ctr = (clicks / [1]) * 100
CTR is calculated by dividing the number of clicks by the number of impressions, then multiplying by 100 to get a percentage.
Complete the code to calculate Cost Per Acquisition (CPA) given total cost and number of conversions.
cpa = total_cost / [1]CPA is the total cost divided by the number of conversions, showing how much each conversion costs.
Fix the error in the formula to calculate Return on Ad Spend (ROAS).
roas = [1] / total_costROAS is revenue divided by total cost, showing how much revenue is earned for each dollar spent.
Fill both blanks to create a dictionary comprehension that maps each metric to its formula string.
{'CTR': '[1]', 'CPA': '[2]'}CTR is clicks divided by impressions times 100, CPA is total cost divided by conversions.
Fill all three blanks to create a dictionary comprehension filtering metrics with positive values.
{metric: value for metric, value in data.items() if value [1] 0 and metric != '[2]' and metric != '[3]'}This comprehension keeps metrics with values greater than zero, excluding 'clicks' and 'impressions'.