9
0
Introduction
Ever heard of Remind? No? Neither did I until about 2 years ago. Basic premise of it is for teachers to send out reminders and communicate with their students. Pretty neat, right? It even allows you send emotes and react to messages! Which I do on a daily basis.
But, one thing about Remind is that the teachers always send the "Do your homework!" "If you don't, you'll get an F!". But, there is useful stuff too, like "Test on Tuesday", or the occasional "Have a good day!". I almost always reply happy with a thumbs up, but sometimes, I have to put a thumbs down.
Challenge
Your task today is to find out if a message has a certain connotation to it. If it has a positive connotation to it, reply with a thumbs up. If it has a negative connotation, reply with a thumbs down.
How am I supposed to detect connotations?
A positive connotation will normally have 3 words in it. The 3 words are: Happy, Good, and Passed.
A negative connotation will have 3 also. Those 3: Test, Fail, and Homework.
What am I testing for?
You are testing to see if a message contains positive, negative or both connotations.
If a message has positive connotations to it, go ahead and return the unicode code point for thumbs up (U+1F44D).
If it has negative connotations to it, return the unicode code point for thumbs down (U+1F44E).
If the message has both negative and positive connotations, return the code point for a neutral face (U+1F610).
If, for some other reason, it doesn't have either connotations, return a nice ol' shrug (¯\_(ツ)_/¯). If the shrug doesn't show up right, here's the Emojipedia link to the shrug
Constraints
- Program must take a message as input.
- Positive connotations must return thumbs up code point (U+1F44D)
- Negative connotations must return thumbs down code point (U+1F44E).
- If the message has both connotations, return the neutral face code point (U+1F610).
- If the message has neither connotations, return the shrug (¯\_(ツ)_/¯).
- This is code-golf, Shortest bytes win
Test cases.
Input -> Output
Happy Good Friday! -> U+1F44D
Congrats, you just played yourself -> ¯\_(ツ)_/¯
You failed the test. -> U+1F44E
Good job on the test. -> U+1F610
You need to escape it – Rod – 2017-05-26T17:43:25.720
it's fine, the test case has the full shrug – KuanHulio – 2017-05-26T17:43:58.133
1"If the message has both connotations, return the neutral face code point (U+1F610)." And no, not case sensitive. – KuanHulio – 2017-05-26T17:47:41.650
To clarify: if the string contains both types of words, return neutral, regardless of if there is more of one type than the other? – Shaggy – 2017-05-26T17:56:30.277
@Shaggy yes, just return neutral – KuanHulio – 2017-05-26T17:57:49.247
You linked to (U+1F937), but requested "¯\(ツ)/¯", why did you link to that? – Theraot – 2017-05-27T22:21:33.087
@Theraot where does the OP ask for U+1F937? That article is about emojis and emoticons relating to people shrugging. That's why it's called "people shrugging" – caird coinheringaahing – 2017-05-27T23:57:28.870
@Ilikemydog OP didn't ask for U+1F937, did I say he asked for it? No I didn't. I said OP linked to it. While it is true that the article has emoticons related to people shrugging, that article is about one particular emoji, this one: (which has the code point U+1F937), and it list the different emoticons different platforms use to represent it. OP didn't ask for that emoji. That is precisely my point. Why did KuanHulio link to it? – Theraot – 2017-05-28T00:18:32.587
It has the shruggie unicode. That's why I linked to it. – KuanHulio – 2017-05-28T01:16:19.367