Ai
1 Star 0 Fork 0

Role/Python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
count_vowels.py 328 Bytes
一键复制 编辑 原始数据 按行查看 历史
utkarsh saxena 提交于 2020-11-20 08:21 +08:00 . changes made in count_vowels.py
vowels = 'aeiou'
ip_str = 'Hello, have you tried our tutorial section yet?'
# count the vowels
vowel_count = 0
consonant_count = 0
for char in ip_str:
if char in vowels:
vowel_count += 1
else:
consonant_count +=1
print ("Total Vowels: ", vowel_count)
print ("Total consonants: ", consonant_count)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/CRole/Python.git
git@gitee.com:CRole/Python.git
CRole
Python
Python
master

搜索帮助