def probability_of(qty, user_settings):
 if (qty in ['exercise', 'video']):
  return sqrt(((user_settings['effort_level'] * 3) * user_settings['time_in_program']))
 if (qty == 'completed'):
  return ((((0.33 * user_settings['effort_level']) + (0.66 * user_settings['speed_of_learning'])) * 2) * user_settings['time_in_program'])
 if (qty == 'attempts'):
  return ((((0.33 * user_settings['effort_level']) + (0.55 * user_settings['time_in_program'])) / probability_of('completed', user_settings)) / 5)

def probability_of ( qty , user_settings ) : if ( qty in [ 'exercise' , 'video' ] ) : return sqrt ( ( ( user_settings [ 'effort_level' ] * 3 ) * user_settings [ 'time_in_program' ] ) ) if ( qty == 'completed' ) : return ( ( ( ( 0.33 * user_settings [ 'effort_level' ] ) + ( 0.66 * user_settings [ 'speed_of_learning' ] ) ) * 2 ) * user_settings [ 'time_in_program' ] ) if ( qty == 'attempts' ) : return ( ( ( ( 0.33 * user_settings [ 'effort_level' ] ) + ( 0.55 * user_settings [ 'time_in_program' ] ) ) / probability_of ( 'completed' , user_settings ) ) / 5 )
share some probabilities across exercise and video logs .