Skip to content

Commit d099358

Browse files
committed
New file
1 parent 0d427a5 commit d099358

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

panic.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
phrase = "Don't panic!"
2+
plist = list(phrase)
3+
for i in range(4):
4+
plist.pop()
5+
plist.pop(0)
6+
plist.remove("'")
7+
plist.extend([plist.pop(), plist.pop()])
8+
plist.insert(2,plist.pop(3))
9+
new_phrase = "".join(plist)
10+
print(plist)
11+
print(new_phrase)

vowels.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
vowels = ['a', 'e', 'i', 'o', 'u']
2+
word = "Milliways"
3+
for letter in word:
4+
if letter in vowels:
5+
print(letter)

vowels2.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
vowels = ['a', 'e', 'i', 'o', 'u']
2+
word = input("Provide a word to search for vowels: ")
3+
found = []
4+
for letter in word:
5+
if letter in vowels:
6+
if letter not in found:
7+
found.append(letter)
8+
for vowel in found:
9+
print(vowel)

vowels3.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
vowels = ['a', 'e', 'i', 'o', 'u']
2+
word = input("Provide a word to search for vowels: ")
3+
found = []
4+
for letter in word:
5+
if letter in vowels:
6+
if letter not in found:
7+
found.append(letter)
8+
for vowel in found:
9+
print(vowel)

0 commit comments

Comments
 (0)