def work_life_balance(task: str, mood: str = 'neutral') -> str:
"""
A function to balance work and fun.
Args:
- task (str): The task to execute.
- mood (str): Mood is not mooding. Default is 'neutral'.
Returns:
- str: not too professional.
"""
fun_emojis = {
'happy': '😄',
'neutral': '😐',
'sad': '😞'
}
professional_advice = {
'happy': "Awesome! Just pause that third dance party and tackle your to-do list first.",
'neutral': "You're in the middle, my friend. Keep it steady—avoid Procrastination Town or Overwork City!",
'sad': "Feeling down? Take a break, watch a funny cat video, and come back strong!"
}
if mood not in fun_emojis:
return "Invalid mood! Choose 'happy', 'neutral', or 'sad'. Otherwise, we'll assume you're a robot in disguise."
return (f"Task to complete: {task} {fun_emojis[mood]}. "
f"Advice: {professional_advice[mood]}")
message = work_life_balance("Wrangle the wild Python project", "happy")
print(message)
I may be slow to respond.
Pinned Loading
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.