diff options
author | standenboy <standenboy@seacrossedlovers.xyz> | 2023-12-15 10:19:20 +0000 |
---|---|---|
committer | standenboy <standenboy@seacrossedlovers.xyz> | 2023-12-15 10:19:20 +0000 |
commit | 4a95719d58a708ad55b1389631d6339047f786a0 (patch) | |
tree | 26cb6fc2dbe7fa75f57f1d6fb13aff8955772b56 /comp/work/5/wordCount.py |
added existing work
Diffstat (limited to 'comp/work/5/wordCount.py')
-rwxr-xr-x | comp/work/5/wordCount.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/comp/work/5/wordCount.py b/comp/work/5/wordCount.py new file mode 100755 index 0000000..8674b3f --- /dev/null +++ b/comp/work/5/wordCount.py @@ -0,0 +1,12 @@ +sentence = input("sentence: ") + +cons = 0 +spaces = 0 + +for i in sentence: + if i == ' ': + spaces =+ 1 + + if i != 'a' and i != 'e' and i != 'i' and i != 'o' and i != 'u': + cons = cons + 1 +print("there are", cons - 2, "consinants and", spaces + 2, "words") |