Python में DeepSeek के साथ काम करना
James Chapman
AI Curriculum Lead, DataCamp
print(response.choices[0].message.content)
Step 1 - ...
Step 2 - ...
Final Answer: ...
reasoning_effort="high" या "max" से ट्यून करेंtemperature का reasoning के दौरान कोई प्रभाव नहीं✅ What are the differences between lists and tuples in Python?
❌ In Python, there are different data structures. Lists are...
✅ Who developed the Python programming language?
❌
Example 1:
Q: Who developed the R programming language?
A: Ross Ihaka and Robert Gentleman
"... Take your time and think through each step."
❌ टोकन उपयोग बढ़ता है
❌ रिस्पॉन्स समय बढ़ता है


response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Pro",
messages=[{"role": "user", "content": "Return the result of 1+1."}]
)
print(response.choices[0].message.content)
Let's count step by step.
- Start with 1.
- Add another 1.
- 1 + 1 = 2.
**Final Answer: 2**



prompt = """
[Task: Fix the following code.]
Code:
def count_to_ten(start):
while start < 10:
print(start)
return "Done"
count_to_ten(1)
"""
print(response.choices[0].message.content)
मैं फ़ंक्शन को चरण-दर-चरण देखता हूँ.
फ़ंक्शन में while लूप है: while start < 10. फिर यह start प्रिंट करता है. लेकिन रुकिए, लूप के अंदर
start वैरिएबल का increment नहीं है — यही समस्या है.
समाधान: लूप के अंदर start को increment करें, जैसे start += 1.
सुधारा हुआ कोड:
def count_to_ten(start):
while start < 10:
print(start)
start += 1
return "Done"
count_to_ten(1)
Python में DeepSeek के साथ काम करना