wordCount.py (295B)
1 sentence = input("sentence: ") 2 3 cons = 0 4 spaces = 0 5 6 for i in sentence: 7 if i == ' ': 8 spaces =+ 1 9 10 if i != 'a' and i != 'e' and i != 'i' and i != 'o' and i != 'u': 11 cons = cons + 1 12 print("there are", cons - 2, "consinants and", spaces + 2, "words")