Mi amigo necesitaba ayuda con una tarea de la escuela y pensé que sería una buena adición para incluir también como desafío aquí.
Crea una función que reciba una oración y devuelva una oración modificada de acuerdo con estas reglas:
small_favor("I was born on 11/02/98")
➞ "I was born on 11/02/1998"
small_favor("I was born on 11/02/98 and what about you?")
➞ "I was born on 11/02/1998 and what about you?"
small_favor("I was born on 02.11.19")
➞ "I was born on 02.11.2019"
small_favor("I was born on February, 02. 98.")
➞ "I was born on February, 02. 1998."
small_favor("I was born on January, 01. 15. and today is October, 08. 20.")
➞ "I was born on January, 01. 2015. and today is October, 08. 2020."
small_favor("I was born on Fakemonthy, 01. 15. dont change invalid dates")
➞ "I was born on Fakemonthy, 01. 15. dont change invalid dates"No olvides aplicar la regla arbitraria del prefijo del año definida anteriormente.