def get_cosmetic_display_price(course, registration_price):
 currency_symbol = settings.PAID_COURSE_REGISTRATION_CURRENCY[1]
 price = course.cosmetic_display_price
 if (registration_price > 0):
  price = registration_price
 if price:
  return _('{currency_symbol}{price}').format(currency_symbol=currency_symbol, price=price)
 else:
  return _('Free')

def get_cosmetic_display_price ( course , registration_price ) : currency_symbol = settings . PAID_COURSE_REGISTRATION_CURRENCY [ 1 ] price = course . cosmetic_display_price if ( registration_price > 0 ) : price = registration_price if price : return _ ( '{currency_symbol}{price}' ) . format ( currency_symbol = currency_symbol , price = price ) else : return _ ( 'Free' )
return course price as a string preceded by correct currency .