Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

15
Task/Nth/Python/nth-2.py Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env python3
def ord(n):
try:
s = ['st', 'nd', 'rd'][(n-1)%10]
if (n-10)%100//10:
return str(n)+s
except IndexError:
pass
return str(n)+'th'
if __name__ == '__main__':
print(*(ord(n) for n in range(26)))
print(*(ord(n) for n in range(250,266)))
print(*(ord(n) for n in range(1000,1026)))