From 689ea50ed3b5211e0cbd32ff331e145f07b47669 Mon Sep 17 00:00:00 2001 From: alangnt Date: Mon, 30 Mar 2026 21:37:57 +0200 Subject: [PATCH 1/2] chore: updated README file with today's link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d77fe73..2f8c8a8 100644 --- a/README.md +++ b/README.md @@ -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:** ❓❓❓ From c9489d2e9a80cfef203e7150437de4b002603754 Mon Sep 17 00:00:00 2001 From: alangnt Date: Mon, 30 Mar 2026 21:38:05 +0200 Subject: [PATCH 2/2] feat: ye olde emoticons python solution --- .../3-30-ye-olde-emoticons/ye-olde-emoticons.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 march-2026/3-30-ye-olde-emoticons/ye-olde-emoticons.py diff --git a/march-2026/3-30-ye-olde-emoticons/ye-olde-emoticons.py b/march-2026/3-30-ye-olde-emoticons/ye-olde-emoticons.py new file mode 100644 index 0000000..d506d4b --- /dev/null +++ b/march-2026/3-30-ye-olde-emoticons/ye-olde-emoticons.py @@ -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 \ No newline at end of file