Skip to content

Commit e49f6e7

Browse files
committed
Mini capstone almost done
1 parent 5e7d021 commit e49f6e7

File tree

1 file changed

+17
-67
lines changed

1 file changed

+17
-67
lines changed

code/kelin/labs/mini_capstone.py

Lines changed: 17 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,17 @@
1-
import emoji
2-
from regex import F
3-
import word2emoji
4-
51
# https://pypi.org/project/emoji/ emoji 2.0.0
62
# pip install emoji
73
# emoji list https://carpedm20.github.io/emoji/
84

5+
# https://pypi.org/project/word2emoji/ word2emoji 0.1.5
6+
# pip install word2emoji
7+
8+
import emoji
9+
import word2emoji
10+
911
# Using emoji package to help describe my understanding of Python lessons:
10-
# Fundamentals
11-
# Exceptions + Testing
12-
# Numbers + Arithmetic
13-
# Booleans + Comparisons + Conditionals
14-
# Imports + Modules + Packages
15-
# Random
16-
# While + For Loops
17-
# Strings
18-
# Lists + Tuples
19-
# Functions
20-
# Dictionaries
21-
# Regular Expressions in Python
22-
# Datetimes
23-
# Classes
24-
# Requests
25-
# Docstrings
26-
# File IO
27-
# Sets
28-
# Virtual Environments
29-
30-
print(emoji.emojize(f'Learning Python is :downcast_face_with_sweat: sometimes, and it can even make me feel like :exploding_head: !!!'))
12+
13+
14+
print(emoji.emojize(f'Learning Python is :downcast_face_with_sweat: sometimes it can even make me feel like :exploding_head: !!!'))
3115

3216
# emojize takes the code and displays the emoji
3317

@@ -42,61 +26,27 @@
4226

4327

4428

45-
# exceptions = input(emoji.demojize(f'Exceptions + Testing enter an emoji code: \n✅\nor\n❌ '))
29+
# word2emoji takes a word and turns it into an emoji
4630

47-
# demojize takes the emoji and displays the code for it
31+
# emoji.demojize takes the emoji and displays the code for it
4832

4933
learning.append ({
5034
'Learning Python is' : wordemoji,
51-
'sometimes, and it can even make me feel like' : wordtwoemoji
35+
'sometimes it can make me feel like' : wordtwoemoji
5236
})
5337

5438
# The user inputed word is turned into an emoji
5539

5640
emojicode = emoji.demojize(wordemoji)
5741
emojicodetwo= emoji.demojize(wordtwoemoji)
5842

59-
# The emojis are turned into codes
43+
# The emojis are turned into a message and the codes are displayed to user
6044

61-
print(learning, 'Your emoji codes are ',emojicode, 'and ', emojicodetwo)
45+
learningprint = pprint.Pre(learning)
6246

47+
print(learningprint, 'Your emoji codes are ',emojicode, 'and ',emojicodetwo)
6348

64-
# print(emoji.demojize(wordemoji, wordtwoemoji))
65-
66-
# if fundamentals == (':check_mark_button:'):
67-
# lessons.append ({
68-
# 'Fundamentals': fundamentals
69-
# })
70-
# else if fundamentals == (':cross_mark:')
71-
# lessons.append ({
72-
# 'Fundamentals': fundamentals
73-
# })
74-
75-
# exceptions = input(emoji.demojize(f'Exceptions + Testing enter ✅ if reviewed: '))
76-
# if exceptions == (':check_mark_button:'):
77-
# lessons.append ({
78-
# 'Exceptions + Testing': exceptions
79-
# })
80-
# else:
81-
# print('Please review Exceptions + Testing')
82-
83-
# print(emoji.emojize(str(lessons)))
84-
85-
86-
# Fundamentals\nExceptions + Testing\nNumbers + Arithmetic\nBooleans + Comparisons + Conditionals\nImports + Modules + Packages\nRandom\nWhile + For Loops\nStrings\nLists + Tuples\nFunctions\nDictionaries\nRegular Expressions in Python\nDatetimes\nClasses\nRequests\nDocstrings\nFile IO\nSets\nVirtual Environments\n\nEnter a lesson to see my description: ')
8749

88-
# if lesson == 'Fundamentals':
89-
# print(emoji.emojize(f'Fundamentals :school: is about different data types from strings :COOL_button: to integers :input_numbers: and also goes over dictionaries and lists.'))
90-
# elif lesson == 'Exceptions':
91-
# print(emoji.emojize(f'Exceptions and Testing :test_tube: is about Python finding errors in your code and giving you a message :spiral_notepad:" including the line :pencil:" the error occured on.'))
92-
# elif lesson == 'Numbers':
93-
# print(emoji.emojize(f'Numbers and Arithmetic :input_numbers: in Python is about different types of numbers from Integers to Floats and mathematical operations to get a result from those numbers'))
94-
95-
# lessons.append ({
96-
# 'Fundamentals': fundamentals})
97-
98-
99-
100-
# variable = pippackage.getpipthing('parameters')
50+
# Add support for entering own emoji codes
10151

102-
# print(variable)
52+

0 commit comments

Comments
 (0)