开始使用免费开始使用

用连贯思维揭示推理过程

这里有一道常见的数学题:需要确定篮子里水果的数量。您希望让 ChatGPT 为您解题,并提供逐步的推理过程。

用于与 ChatGPT 通信的 get_response() 函数已为您预先加载。

本练习是课程的一部分

Python 可解释性 AI

查看课程

练习说明

  • 补全 prompt,以获得该问题的连贯思维推理过程。

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Complete the chain-of-thought prompt
prompt = "In a basket, there are twice as many apples as oranges and three times as many oranges as bananas. If there are 6 bananas in the basket, how many fruits are there in total? ____"

response = get_response(prompt)
print(response)
编辑并运行代码