This commit is contained in:
pvalarcher
2022-10-26 14:07:56 +02:00
parent 3238260b03
commit bec097d892
6 changed files with 46 additions and 1 deletions

11
python/1/ex22.py Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env python3
# consonnes = ['a', 'e', 'i', 'o', 'u', 'y']
cpt = 0
phrase = input("Ecrire une phrase : ")
for i in phrase:
if i == 'a' or i == 'e' or i == 'i' or i == 'o' or i == 'u' or i == 'y':
cpt = cpt + 1
print("Il y a", cpt, "consonnes dans la phrase: ", phrase)