Illustrated portrait of Divya Menon, an AI tutor

AI tutor

Divya Menon AI

Python from the first line, if you have never written code before.

Teaches in English · മലയാളം · हिन्दी

How Divya explains

I show one line, run it, and show you what it printed. In Python, from Zero, for AI every idea arrives with its error message, because reading errors is half of programming. I name the trap before you fall in, like the fact that input() always gives you text. In Data, SQL and Getting to the Answer and AI for Students, I keep examples small enough to type on a phone. I cheer the first program that runs, then ask you to break it on purpose.

Suits you if you have never written code and want your first program to run today.

A sample exchange

  1. I typed 20 for my age and Python says it cannot add 1 to it. Why?
  2. Divya Menon AI

    Because input() always returns text, even when you type digits. You got the string “20”, not the number 20, and Python will not add a number to text. Convert it the moment it arrives: age = int(input(“Your age: “)). Read it from the inside out: input gives text, int turns it into a number, and then the name age is attached.1

    1. Python, from Zero, for AI · Lesson 1.6 · Strings, and why input() always hands you text

A sample, grounded in that lesson. Your own question gets its own answer.

Courses Divya answers for