جواب «Hint, Not Answer» چالش 3 از جلسهی 10
سؤال
تابع hint_prompt(question) بنویس که جلوی سؤال این متن را بگذارد: Give me a hint, not the full answer: . بعد پرامپت ساختهشده را چاپ کن و جواب ai.ask به آن را هم.
راهنما
return "Give me a hint, not the full answer: " + question و آخر print(ai.ask(prompt)).
یک جواب درست
import ai
def hint_prompt(question):
return "Give me a hint, not the full answer: " + question
question = "how do I add up the numbers in a list?"
prompt = hint_prompt(question)
print(prompt)
print(ai.ask(prompt))
اول خودت امتحان کن؛ جوابهای دیگر هم قبول است. برگرد و خودت حلش کن