def _prep_hit(unrounded):
 also_log = u''
 rounded = unrounded
 if (unrounded < MINIMUM_CHARGE):
  rounded = MINIMUM_CHARGE
  also_log = (u' [rounded up from $%s]' % unrounded)
 (upcharged, fee) = upcharge(rounded)
 cents = int((upcharged * 100))
 amount_str = u'%d cents ($%s%s + $%s fee = $%s)'
 amount_str %= (cents, rounded, also_log, fee, upcharged)
 return (cents, amount_str, upcharged, fee)

def _prep_hit ( unrounded ) : also_log = u'' rounded = unrounded if ( unrounded < MINIMUM_CHARGE ) : rounded = MINIMUM_CHARGE also_log = ( u' [rounded up from $%s]' % unrounded ) ( upcharged , fee ) = upcharge ( rounded ) cents = int ( ( upcharged * 100 ) ) amount_str = u'%d cents ($%s%s + $%s fee = $%s)' amount_str %= ( cents , rounded , also_log , fee , upcharged ) return ( cents , amount_str , upcharged , fee )
takes an amount in dollars .