Anishluke92 / RubySolution

Problem solving using Ruby programming language
0 stars 1 forks source link

Emotify the Sentence #70

Closed danielpaul closed 3 years ago

danielpaul commented 3 years ago

Create a function that changes specific words into emoticons. Given a sentence as a string, replace the words smile, grin, sad and mad with their corresponding emoticons.

word emoticon
smile :D
grin :)
sad :(
mad :P

Examples

emotify("Make me smile") ➞ "Make me :D"

emotify("Make me grin") ➞ "Make me :)"

emotify("Make me sad") ➞ "Make me :("

Notes

The sentence always starts with "Make me". Try to solve this without using conditional statements like if/else.