def get_omer_string(omer):  # pylint: disable=too-many-branches
    """Return a string representing the count of the Omer."""
    # TODO: The following function should be simplified (see pylint)
    tens = [u"", u"עשרה", u"עשרים", u"שלושים", u"ארבעים"]
    ones = [u"", u"אחד", u"שנים", u"שלושה", u"ארבעה", u"חמשה",
            u"ששה", u"שבעה", u"שמונה", u"תשעה"]
    if not 0 < omer < 50:
        raise ValueError('Invalid Omer day: {}'.format(omer))
    ten = omer // 10
    one = omer % 10
    omer_string = u'היום '
    if 10 < omer < 20:
        omer_string += ones[one] + u' עשר'
    elif omer > 9:
        omer_string += ones[one]
        if one:
            omer_string += u' ו'
    if omer > 2:
        if omer > 20 or omer in [10, 20]:
            omer_string += tens[ten]
        if omer < 11:
            omer_string += ones[one] + u' ימים '
        else:
            omer_string += u' יום '
    elif omer == 1:
        omer_string += u'יום אחד '
    else:  # omer == 2
        omer_string += u'שני ימים '
    if omer > 6:
        omer_string += u'שהם '
        weeks = omer // 7
        days = omer % 7
        if weeks > 2:
            omer_string += ones[weeks] + u' שבועות '
        elif weeks == 1:
            omer_string += u'שבוע אחד '
        else:  # weeks == 2
            omer_string += u'שני שבועות '
        if days:
            omer_string += u'ו'
            if days > 2:
                omer_string += ones[days] + u' ימים '
            elif days == 1:
                omer_string += u'יום אחד '
            else:  # days == 2
                omer_string += u'שני ימים '
    omer_string += u'לעומר'
    return omer_string
def get_omer_string ( omer ) : tens = [ u"" , u"עשרה" , u"עשרים" , u"שלושים" , u"ארבעים" ] ones = [ u"" , u"אחד" , u"שנים" , u"שלושה" , u"ארבעה" , u"חמשה" , u"ששה" , u"שבעה" , u"שמונה" , u"תשעה" ] if not 0 < omer < 50 : raise ValueError ( 'Invalid Omer day: {}' . format ( omer ) ) ten = omer // 10 one = omer % 10 omer_string = u'היום ' if 10 < omer < 20 : omer_string += ones [ one ] + u' עשר' elif omer > 9 : omer_string += ones [ one ] if one : omer_string += u' ו' if omer > 2 : if omer > 20 or omer in [ 10 , 20 ] : omer_string += tens [ ten ] if omer < 11 : omer_string += ones [ one ] + u' ימים ' else : omer_string += u' יום ' elif omer == 1 : omer_string += u'יום אחד ' else : omer_string += u'שני ימים ' if omer > 6 : omer_string += u'שהם ' weeks = omer // 7 days = omer % 7 if weeks > 2 : omer_string += ones [ weeks ] + u' שבועות ' elif weeks == 1 : omer_string += u'שבוע אחד ' else : omer_string += u'שני שבועות ' if days : omer_string += u'ו' if days > 2 : omer_string += ones [ days ] + u' ימים ' elif days == 1 : omer_string += u'יום אחד ' else : omer_string += u'שני ימים ' omer_string += u'לעומר' return omer_string
Return a string representing the count of the Omer.