Cod sursa(job #2629885)

Utilizator Neamtu93George Neamtu93 Data 23 iunie 2020 10:24:36
Problema Text Scor 30
Compilator py Status done
Runda Arhiva de probleme Marime 0.29 kb


def main():
    with open("text.in","r") as f:
        text = f.readline()

    cuvinte = len(text.split(" "))
    lungime = 0
    for i in text:
        if(i.isalpha()):
            lungime+=1
    with open("text.out","w") as f:
        f.write(str(lungime//cuvinte))

main()