This commit is contained in:
pvalarcher
2022-11-18 09:17:43 +01:00
parent 3c52421dba
commit b92cb19bfc
6 changed files with 112 additions and 2 deletions

17
python/5/exoNote.py Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env python3
nomFic = input("Entrer un nom de fichier : ")
f = open(nomFic, "r")
lignes = f.readlines()
c = 0
for ligne in lignes:
for i in range(len(ligne)):
if ligne[i] == 'a':
c = c + 1
f.close()
print("il y a ", c, " 'a' dans le ficher!")