In this lesson, we will learn how to reuse a reusable part of a program as a function.
The Python code used in this lesson:
def emoji_converted(message):
separate_words = message.split(' ')
emoji = {
":)": "😊",
":(": "☹"
}
output = ""
for word in separate_words:
output += emoji.get(word, word) + " "
return output
message = input("Type your message: ")
result = emoji_converted(message)
print(result)
‘You are free to copy, edit, use and distribute this code without crediting the author. Enjoy copyright-free content.’ – Nuruzzaman Faruqui.
На этой странице сайта вы можете посмотреть видео онлайн Reusables in Function длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Nuruzzaman Faruqui 25 Сентябрь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 489 раз и оно понравилось 2 зрителям. Приятного просмотра!