<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ordinal(n):
 """Returns the ordinal string for a given integer See https://stackoverflow.com/a/20007730/1307974 Parameters n : `int` the number to convert to ordinal Examples -------- '11th' '102nd' """

    idx = int((n//10 % 10 != 1) * (n % 10 < 4) * n % 10)
    return '{}{}'.format(n, "tsnrhtdd"[idx::4])