Skip to content

Commit ec800e6

Browse files
committed
twitter update
1 parent 7e00dbf commit ec800e6

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

Problem Set 2/twttr/twttr.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
inp = input("Input: ")
2-
print("Output: ", end="")
1+
def main():
2+
word = input("Input: ")
3+
print("Output: ", end="")
4+
word_without_vowel = shorten(word)
5+
print(word_without_vowel)
6+
37

4-
for letter in inp:
5-
if not letter.lower() in ['a', 'e', 'i', 'o', 'u']:
6-
print(letter, end="")
7-
print()
8+
9+
def shorten(word):
10+
word_without_vowel = ''
11+
for letter in word:
12+
if not letter.lower() in ['a', 'e', 'i', 'o', 'u']:
13+
word_without_vowel += letter
14+
return word_without_vowel
15+
16+
17+
if __name__ == "__main__":
18+
main()

Problem Set 5/test_twttr/test_twttr.py

Whitespace-only changes.

0 commit comments

Comments
 (0)