CBSE AI syllabus: all classes Class 9 AI (417) · Unit 5

Class 9 AI Unit 5: Introduction to Python

1 theory hours · 9 practical hours · 8 theory marks

What this unit is about

A first programming course. It starts with a coding game (such as Code Combat), then Python basics: variables, data types (integer, float, string), type conversion, arithmetic, comparison, logical and assignment operators, print() and input(), conditions and loops (if, for, while), and simple list operations.

Learn it with the AI tutor, one minute each

What the unit covers

  • Programming through a gamified platform.
  • Variables, data types, type conversion, operators, print() and input().
  • Flow of control: if, for and while.
  • Python lists and simple list operations.

Key terms

Variable
A named box that stores a value, such as marks = 85.
Type conversion
Changing a value's type, such as int("5") turning text into a number.
Loop
Repeating steps: for repeats a set number of times, while repeats while a condition is true.
List
An ordered collection in square brackets, such as [10, 20, 30].

Exam-style questions

  1. 1. Why does input() + 5 give an error, and how do you fix it?

    Show answer →

    input() returns a string, which cannot be added to a number. Convert it first: int(input()) + 5.

  2. 2. Write a loop that prints the numbers 1 to 5.

    Show answer →

    for i in range(1, 6): print(i)

Get your personalized AI tutor

Join the beta program for free.

Or ask on WhatsApp

Sources

Unit names, hours and marks checked against the official CBSE 2026-27 curriculum on 1 November 2026. Explanations and questions are written by CogniGuru.