Advertisement
JPablos

Traductor Simple. Python

May 25th, 2022
770
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. # -*- coding: utf-8 -*-
  4.  
  5.  
  6. def traducir(frase):
  7.     traducido = ''
  8.     for letra in frase:
  9.         if letra.lower() in 'aeiou':
  10.             traducido = traducido + 't'
  11.             if letra.isupper():
  12.                 traducido = traducido + 'T'
  13.         else:
  14.             traducido = traducido + letra
  15.     return traducido
  16.  
  17.  
  18. print(traducir(input('Ingrese su frase: ')))
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement