Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Feel free to explore, learn, and share your own approaches.
- [x] **3/27:** Infinite Monkey Theorem 🐒
- [x] **3/28:** 28 Days Later 🧟
- [x] **3/29:** Leaderboard Stats 📊
- [x] **3/30:** Ye Old Emoticons 📰
- [x] **3/30:** [Ye Old Emoticons](https://github.com/codedex-io/daily-challenges/tree/main/march-2026/3-30-ye-olde-emoticons) 📰
- [ ] **3/31:** ❓❓❓
16 changes: 16 additions & 0 deletions march-2026/3-30-ye-olde-emoticons/ye-olde-emoticons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def emoticons_mood(message):
# first let's define the emoticons
happy_emoticons = [":)", ":p", "xd", ":3", "<3", "\\m/"]
sad_emoticons = [":'(", ":(", "t(-.-t)"]

# we init the score
score = 0

# now we calculate
for emoticon in sad_emoticons:
score -= message.lower().count(emoticon)
for emoticon in happy_emoticons:
score += message.lower().count(emoticon)

# then we return the score
return score