Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- total_vocales = 0
- total_consonantes = 0
- frase = input("Ingrese una frase: ")
- for caracter in frase:
- if caracter.lower() in "aeiou":
- total_vocales += 1
- elif caracter.lower() in 'bcdfghjklmnñpqrstvwxyz':
- total_consonantes += 1
- print(f"Consonantes: {total_consonantes} - Vocales: {total_vocales}")
Advertisement
Add Comment
Please, Sign In to add comment