Python ile DeepSeek Kullanımı
James Chapman
AI Curriculum Lead, DataCamp
print(response.choices[0].message.content)
Adım 1 - ...
Adım 2 - ...
Nihai Yanıt: ...
reasoning_effort="high" veya "max" ile ayarlatemperatureın etkisi yoktur✅ 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
"... Acele etme, her adımı düşün."
❌ Daha fazla token kullanımı
❌ Daha uzun yanıt süresi


response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4.1-Flash",
messages=[{"role": "user", "content": "Return the result of 1+1."}]
)
print(response.choices[0].message.content)
Hadi adım adım sayalım.
- 1 ile başla.
- Bir 1 daha ekle.
- 1 + 1 = 2.
**Nihai Yanıt: 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)
Fonksiyonu adım adım inceleyeyim.
Fonksiyon bir while döngüsü kullanıyor: while start < 10. Sonra start'ı yazdırıyor. Ama dur, döngünün içinde
start değişkeni artırılmıyor — sorun bu.
Çözüm: döngü içinde start'ı artırmak, örneğin start += 1.
Düzeltilmiş kod şöyle:
def count_to_ten(start):
while start < 10:
print(start)
start += 1
return "Done"
count_to_ten(1)
Python ile DeepSeek Kullanımı