Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
1.0 kB
20
Indexable
Never
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 16 20:35:39 2021

@author: Quina
"""

print(" @@@    @   @  @@@  @    @      @@")
print("@   @   @   @   @   @@   @     @  @")
print("@ @ @   @   @   @   @ @  @    @@@@@@")
print("@   @   @   @   @   @  @ @   @      @")
print(" @@@ @  @ @ @  @@@  @    @  @        @")

def jumlah_huruf (kal):
    Huruf_konsonan = ("B","C","D","F","G","H","J","K","L","M","P","Q","R","S","T","V","W","X","Y","Z","b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z")
    Huruf_vokal = ("A","I","U","E","O","a","i","u","e","o")
    Jumlah_vokal = 0
    Jumlah_konsonan = 0
    for i in kal:
       if i in Huruf_vokal:
            Jumlah_vokal += 1
       if i in Huruf_konsonan:
            Jumlah_konsonan += 1
    print("Jumlah banyaknya huruf vokal: ")
    print (Jumlah_vokal)
    print ("Jumlah banyaknya huruf konsonan: ")
    print (Jumlah_konsonan)

while True:
    print("\nPROGRAM MENGHITUNG HURUF VOKAL DAN KONSONAN")
    kal = input("Masukkan kalimat: ")
    jumlah_huruf(kal)