ComenzarEmpieza gratis

Analytical problem solving with Claude

After your successful promo, website traffic jumped 40 %, yet paid subscriptions crawled up only 5 %. Activate Claude’s extended thinking to unpack this mismatch: the detailed analysis will guide SkyTrack’s next growth sprint.

The anthropic library and client are preloaded.

Este ejercicio forma parte del curso

Introduction to Claude Models

Ver curso

Instrucciones del ejercicio

  • Create an analytical thinking prompt.
  • Use the thinking parameter in your API call to turn on extended thinking.
  • Set a high max_tokens, such as 1400, to give Claude enough room for reasoning and the answer.
  • Print the analysis results.

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Create an analytical thinking prompt
analysis_prompt = """
Analyze this business scenario and walk me through your reasoning:
Our website traffic increased 40% but sales only grew 5%.
___
Provide multiple possible explanations and rank them by likelihood.
"""

# Request detailed analytical thinking
response = client.messages.create(model="claude-3-7-sonnet-latest", thinking=____, max_tokens=____, messages=[{"role": "user", "content": analysis_prompt}])
# Print the analysis results
print("Analysis results:")
print(response.content[0].thinking)
Editar y ejecutar código