Guest User

Untitled

a guest
Jun 18th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def ordinal(n):
  2.     if (10 < n < 14):
  3.         return n + 'th '
  4.     if (int % 10 == 1):
  5.         return n + 'st '
  6.     if (int % 10 == 2):
  7.         return n + 'nd'
  8.     if (int % 10 == 3)
  9.         return n + 'rd'
  10.     return n + 'th'
Add Comment
Please, Sign In to add comment