You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Dividimos la frase en una lista de palabras
frase_list = frase.split()
# Inicializamos una variable para guardar la longitud de la palabra más larga
mayor = max(len(i) for i in frase_list)
# Imprimimos la línea superior del marco
print("*" * mayor + "*" * 2)
# Iteramos sobre cada palabra en la lista
for j in frase_list:
x = list(j)
# Imprimimos cada palabra con el formato requerido
print("*" + j + " " * (mayor - len(x)) + "*")
# Imprimimos la línea inferior del marco
print("*" * mayor + "*" * 2)
frase = "Hola mundo ¿cómo estás?"
marco(frase)
`
The text was updated successfully, but these errors were encountered:
`
def marco(frase: str):
frase = "Hola mundo ¿cómo estás?"
marco(frase)
`
The text was updated successfully, but these errors were encountered: