gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
help me write a python code express emotion
- User
help me write a python code express emotion
- Assistant
Sure, here's an example of a Python code that expresses emotions:
pythonimport random emotions = ["happy", "sad", "angry", "excited", "disgusted", "surprised"] def express_emotion(): random_emotion = random.choice(emotions) if random_emotion == "happy": print("I am feeling happy today!") elif random_emotion == "sad": print("I'm feeling a bit sad right now.") elif random_emotion == "angry": print("I am really angry!") elif random_emotion == "excited": print("I'm so excited!") elif random_emotion == "disgusted": print("I am disgusted by this.") elif random_emotion == "surprised": print("Wow, I am really surprised!") express_emotion()