primeiro commit com exercicios de Exercism realizados até esta data

This commit is contained in:
2026-10-17 22:10:27 +01:00
commit 58fccbe27a
708 changed files with 35038 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
def line_up(name, number):
ordinal_sufix: str = ""
# for the special case when the tenths of the number is between 10 and 20
# the ordinal of all numbers are equal to 'th'
if number % 100 > 10 and number % 100 < 20:
return f"{name}, you are the {number}th customer we serve today. Thank you!"
match number % 10:
case 1:
ordinal_sufix = "st"
case 2:
ordinal_sufix = "nd"
case 3:
ordinal_sufix = "rd"
case _:
ordinal_sufix = "th"
return f"{name}, you are the {number}{ordinal_sufix} customer we serve today. Thank you!"