Crea un chatbot senzill amb un diccionari de respostes. El bot ha de respondre a preguntes freqüents sobre el teu institut.
pregunta = input('Tu: ').lower().strip() resposta = respostes[pregunta]while True:} break resposta = respostes.get(pregunta, 'Ho sento, no entenc la pregunta.') 'adeu': 'Fins aviat!' 'menjador': 'El menjador és obert de 13h a 15h.', 'horari': 'Les classes comencen a les 8h i acaben a les 14:30h.', if pregunta == 'adeu':print('Bot: Hola! Escriu la teva pregunta (o "adeu" per sortir).') print(f'Bot: {resposta}') 'hola': 'Hola! Sóc el bot del teu institut. Com puc ajudar-te?',respostes = {
CodiCAT