Building with AI
Python — The Language of AI
3 min read
No-code tools are a great start — and a ceiling
No-code and low-code platforms have made it easier than ever to dip a toe into AI. You can drag and drop your way to a working chatbot, get a feel for how AI products are put together, and in some cases even ship something real.
But there's a ceiling. The moment you want to call APIs from major AI providers — OpenAI, Anthropic, Meta's Llama — shape model behavior through prompt engineering, connect a database, or tune model parameters, you've stepped outside what no-code tools can do. Those capabilities are exactly what separates a demo from a real product, and reaching them requires writing code.
Why Python, specifically
Python is the dominant language in data science and AI, consistently ranked at the top of language popularity indexes like Tiobe. That's not an accident — it's the result of a deep, mature ecosystem of libraries built specifically for this kind of work:
- NumPy — multidimensional arrays, matrices, and the math operations AI is built on
- pandas — cleaning, reshaping, and preparing data
- Matplotlib — visualizing data and model behavior
These tools, and hundreds like them, are open source — built and maintained by a global community, free to use, and constantly improving.
What AI code actually looks like
If you've never written a line of code, phrases like "calling an API" or "tuning model parameters" can sound like things that happen behind a curtain, in a language only specialists understand. They aren't. Here's a short, complete, real example of Python code that sends a question to an AI model and prints back the answer:
from anthropic import Anthropic # bring in the toolkit for talking to Claude
client = Anthropic(api_key="your-key-here") # your personal "ID badge" for the service
response = client.messages.create(
model="claude-sonnet-4-6", # which AI model to use
max_tokens=200, # how long the answer is allowed to be
messages=[
{"role": "user", "content": "Explain photosynthesis in one sentence, for a 10-year-old."}
]
)
print(response.content) # show the AI's answer on screen
Strip away the punctuation and what's left reads almost like a sentence: "Here's my ID badge. Using the Sonnet model, and keeping your answer short, please explain photosynthesis simply for a 10-year-old — then show me what you said." That's the whole job. Five readable lines are enough to reach a frontier AI model from your own program. Everything else in this course — APIs, vector databases, evaluation — is about doing that reliably, at scale, and well.
Getting started
You don't need an expensive setup to start writing Python for AI. Common environments include:
- Jupyter Notebook — interactive, cell-by-cell execution, great for experimentation
- Google Colab — Jupyter notebooks in the browser, with free access to GPUs
- Spyder and PyCharm — full-featured IDEs for larger projects
Diagram — What Code Unlocks Beyond No-Code Tools
Key takeaway
Learning to code — and Python specifically — takes real effort, especially if you're starting from zero. But it's the foundation everything else in this course is built on. Without it, AI stays something you use. With it, AI becomes something you build.
What's next?
Once you can write Python, the next skill is connecting your code to the outside world — and that means learning how APIs work.