def DisplayEstimate(message, min_estimate, max_estimate):
 mean_avg_cpc = (_CalculateMean(min_estimate['averageCpc']['microAmount'], max_estimate['averageCpc']['microAmount']) if ('averageCpc' in min_estimate) else None)
 mean_avg_pos = (_CalculateMean(min_estimate['averagePosition'], max_estimate['averagePosition']) if ('averagePosition' in min_estimate) else None)
 mean_clicks = _CalculateMean(min_estimate['clicksPerDay'], max_estimate['clicksPerDay'])
 mean_total_cost = _CalculateMean(min_estimate['totalCost']['microAmount'], max_estimate['totalCost']['microAmount'])
 print message
 print ('  Estimated average CPC: %s' % _FormatMean(mean_avg_cpc))
 print ('  Estimated ad position: %s' % _FormatMean(mean_avg_pos))
 print ('  Estimated daily clicks: %s' % _FormatMean(mean_clicks))
 print ('  Estimated daily cost: %s' % _FormatMean(mean_total_cost))

def DisplayEstimate ( message , min_estimate , max_estimate ) : mean_avg_cpc = ( _CalculateMean ( min_estimate [ 'averageCpc' ] [ 'microAmount' ] , max_estimate [ 'averageCpc' ] [ 'microAmount' ] ) if ( 'averageCpc' in min_estimate ) else None ) mean_avg_pos = ( _CalculateMean ( min_estimate [ 'averagePosition' ] , max_estimate [ 'averagePosition' ] ) if ( 'averagePosition' in min_estimate ) else None ) mean_clicks = _CalculateMean ( min_estimate [ 'clicksPerDay' ] , max_estimate [ 'clicksPerDay' ] ) mean_total_cost = _CalculateMean ( min_estimate [ 'totalCost' ] [ 'microAmount' ] , max_estimate [ 'totalCost' ] [ 'microAmount' ] ) print message print ( '  Estimated average CPC: %s' % _FormatMean ( mean_avg_cpc ) ) print ( '  Estimated ad position: %s' % _FormatMean ( mean_avg_pos ) ) print ( '  Estimated daily clicks: %s' % _FormatMean ( mean_clicks ) ) print ( '  Estimated daily cost: %s' % _FormatMean ( mean_total_cost ) )
displays mean average cpc .