Skip to content

Commit 5e7d021

Browse files
committed
Working on mini cap, emoji decoder
1 parent aa68d34 commit 5e7d021

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

code/kelin/labs/mini_capstone.py

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import emoji
2+
from regex import F
23
import word2emoji
34

45
# https://pypi.org/project/emoji/ emoji 2.0.0
@@ -26,26 +27,41 @@
2627
# Sets
2728
# Virtual Environments
2829

29-
print(emoji.emojize(f'Learning Python is :downcast_face_with_sweat: sometimes, and it can even make my head :exploding_head: !!!'))
30+
print(emoji.emojize(f'Learning Python is :downcast_face_with_sweat: sometimes, and it can even make me feel like :exploding_head: !!!'))
3031

3132
# emojize takes the code and displays the emoji
3233

3334

34-
lessons = []
35+
learning = []
3536
while True:
3637

37-
fundamentals = input(f'Enter a word to describe Fundamentals: ')
38-
fundamentals = word2emoji(fundamentals)
38+
word = input(f'Enter a word to describe learning Python: ')
39+
wordemoji = word2emoji(word)
40+
wordtwo = input(f'Enter another word: ')
41+
wordtwoemoji = word2emoji(wordtwo)
42+
43+
3944

4045
# exceptions = input(emoji.demojize(f'Exceptions + Testing enter an emoji code: \n✅\nor\n❌ '))
4146

4247
# demojize takes the emoji and displays the code for it
4348

44-
lessons.append ({
45-
'Fundamentals': fundamentals
49+
learning.append ({
50+
'Learning Python is' : wordemoji,
51+
'sometimes, and it can even make me feel like' : wordtwoemoji
4652
})
47-
48-
print(emoji.emojize(str(lessons)))
53+
54+
# The user inputed word is turned into an emoji
55+
56+
emojicode = emoji.demojize(wordemoji)
57+
emojicodetwo= emoji.demojize(wordtwoemoji)
58+
59+
# The emojis are turned into codes
60+
61+
print(learning, 'Your emoji codes are ',emojicode, 'and ', emojicodetwo)
62+
63+
64+
# print(emoji.demojize(wordemoji, wordtwoemoji))
4965

5066
# if fundamentals == (':check_mark_button:'):
5167
# lessons.append ({

0 commit comments

Comments
 (0)