Skip to content

Commit 96b6f37

Browse files
committed
added two new problems and updated readme
1 parent ef227d4 commit 96b6f37

15 files changed

+322
-236
lines changed

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,34 @@ $RECYCLE.BIN/
4545
Network Trash Folder
4646
Temporary Items
4747
.apdisk
48+
49+
# Compiled python modules.
50+
*.pyc
51+
52+
# Setuptools distribution folder.
53+
/dist/
54+
55+
# Python egg metadata, regenerated from source files by setuptools.
56+
/*.egg-info
57+
/*.egg
58+
59+
# Ide preference
60+
/.idea
61+
/webapp/.idea/
62+
/webapp/.idea/*
63+
.idea
64+
*.idea
65+
.eslintcache
66+
.eslintrc.json
67+
.vscode/
68+
69+
# Python Cache
70+
/__pycache__
71+
72+
# Virtual environments
73+
/venv/
74+
/venv/*
75+
.env.local
76+
.env.development.local
77+
.env.test.local
78+
.env.production.local
File renamed without changes.
File renamed without changes.
File renamed without changes.

Debugging/DefaultArguments .py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'''
2+
Title : Default Arguments
3+
Subdomain : Debugging
4+
Domain : Python
5+
Author : Ahmedur Rahman Shovon
6+
Created : 08 July 2018
7+
'''
8+
def print_from_stream(n, stream=EvenStream()):
9+
stream.__init__()
10+
for _ in range(n):
11+
print(stream.get_next())

Debugging/WordsScore.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'''
2+
Title : Words Score
3+
Subdomain : Debugging
4+
Domain : Python
5+
Author : Ahmedur Rahman Shovon
6+
Created : 08 July 2018
7+
'''
8+
def is_vowel(letter):
9+
return letter in ['a', 'e', 'i', 'o', 'u', 'y']
10+
11+
def score_words(words):
12+
score = 0
13+
for word in words:
14+
num_vowels = 0
15+
for letter in word:
16+
if is_vowel(letter):
17+
num_vowels += 1
18+
if num_vowels % 2 == 0:
19+
score += 2
20+
else:
21+
score += 1
22+
return score

0 commit comments

Comments
 (0)