Created
January 3, 2020 10:40
-
-
Save YangHgRi/01cccf16aebfbb8961f8ea3f9e13398c to your computer and use it in GitHub Desktop.
i'm learning python :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mood_converter(message): | |
word = message.split(' ') | |
my_mood_tuple = {'happy': ':)', 'sad': ':('} | |
output = '' | |
for message in word: | |
output += my_mood_tuple.get(message, message) + ' ' | |
return output | |
message = input('>') | |
print(mood_converter(message)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment