def invitation_etiquette_bot(user_input): response = "" if "wedding" in user_input: response = "When writing wedding invitations, make sure to include the full names of the hosts, the couple, and details like the date, time, and venue. RSVP information is crucial." elif "formal event" in user_input: response = "For formal events, use formal language. Specify the occasion clearly, include the date and time, and provide any necessary dress code information." elif "casual gathering" in user_input: response = "For casual gatherings, keep the tone friendly and mention the reason for the event. Don't forget to include essential details like date, time, and location." else: response = "I'm sorry, I didn't catch that. Could you specify the type of event for more accurate guidance?" return response # Example usage: user_input = input("Ask the chatbot for invitation etiquette advice: ") result = invitation_etiquette_bot(user_input) print(result)