CBSE 2026-27 · Class 11 · Code 065

Important IP Programs

Master your practical exams with our curated list of essential Python programs for Class 11 Informatics Practices. Click on any program to view the code, copy it, or run it instantly.

In each topic the programs go from Easy to Hard. A CBSE tag shows the paper or practical list a program comes from; Rare marks less common programs that are still in the syllabus.

74 programs in 8 topics

PYTHON BASICS 11 programs

  1. print() shows text on the screen. Text goes inside quotes.

    Easy
  2. A variable stores a value. type() tells the kind of value.

    Easy
  3. input() always gives text. Use int() or float() to get a number.

    Easy
  4. + - * / // % ** with two numbers.

    Easy
  5. sep= changes what goes between values; end= changes what comes at the end.

    Easy
  6. Change a value from one type to another with int(), float() and str().

    Easy
  7. Relational operators compare values; and / or / not join conditions.

    Medium
  8. x += 5 is the short form of x = x + 5.

    Medium
  9. Python does ** first, then * / // %, then + -. Brackets change the order.

    Medium
  10. A list can be changed in place (mutable); a string cannot (immutable).

    Medium
  11. Syntax error: wrong grammar. Runtime error: crashes while running. Logical error: wrong answer.

    Medium

EVERYDAY CALCULATIONS 10 programs

  1. Find the average of marks in 5 subjects and the grade for it.

  2. Find the sale price of an item from its cost and discount %.

  3. Rectangle: area = l x b, perimeter = 2(l + b). Square: area = s x s, perimeter = 4s.

  4. Circumference = 2 x pi x r, area = pi x r x r.

  5. Perimeter = a + b + c. Area by Heron's formula: s = half the perimeter, area = square root of s(s-a)(s-b)(s-c).

  6. SI = P x R x T / 100. Amount with CI = P x (1 + R/100) ** T, and CI = Amount - P.

  7. If selling price is more than cost price it is a profit, if less it is a loss.

  8. EMI = P x R x (1+R)^N / ((1+R)^N - 1), where R is the monthly rate and N the number of months.

  9. GST is added to the price. With CGST and SGST, each is half of the GST rate.

  10. Different rates for different units: an if-elif ladder works out each slab.

    Hard Rare

CONDITIONAL STATEMENTS (IF, ELIF, ELSE) 6 programs

  1. If the remainder after dividing by 2 is 0, the number is even.

    Easy
  2. Three choices need if, elif and else.

    Easy
  3. A person can vote at 18 years or more.

    Easy
  4. Compare with and: the largest is bigger than or equal to both others.

    Medium
  5. Divisible by 4 but not by 100, or divisible by 400.

    Medium
  6. Pick the operation with if-elif.

    Medium

LOOPS (FOR AND WHILE) 11 programs

  1. range(5) gives 0 to 4; range(1, 6) gives 1 to 5; range(2, 11, 2) jumps by 2.

    Easy
  2. A while loop repeats as long as its condition is True.

    Easy
  3. Print the first n multiples of a given number.

  4. Print the table of a number.

    Easy
  5. Keep adding each number to a total.

    Easy
  6. Add 1x1 + 2x2 + ... + 100x100.

  7. 5! = 1 x 2 x 3 x 4 x 5.

    Medium
  8. break stops the loop; continue skips just this round.

    Medium
  9. Read n marks one by one and add them up.

    Medium
  10. The outer loop makes rows; the inner loop prints the stars of one row.

    Hard
  11. % 10 gives the last digit and // 10 removes it.

    Hard Rare

STRINGS 5 programs

  1. Strings can be joined with +, repeated with *, and checked with in.

    Easy
  2. Count the vowels in a string entered by the user.

  3. Print the words of a string that start with a given letter.

  4. For a few strings, print how many times a given letter appears in each.

  5. Slicing with [::-1] reverses a string.

    Hard Rare

LISTS 15 programs

  1. Positions start at 0. Negative positions count from the end.

    Easy
  2. Visit each item one by one.

    Easy
  3. L[start:stop] gives items from start up to stop - 1.

    Easy
  4. + joins two lists, * repeats a list, in checks if an item is present.

    Easy
  5. append() adds at the end; insert(pos, item) adds at a position.

    Easy
  6. remove(value) deletes by value; pop() deletes the last item (or a given position) and returns it.

    Easy
  7. Built-in functions on a list of numbers.

    Easy
  8. count(x) says how many times x appears; index(x) gives the position of the first x.

    Medium
  9. sort() arranges the list; reverse() turns it back to front.

    Medium
  10. Items of a list can be changed. list() makes a list from a string or range.

    Medium
  11. Find the largest and smallest numbers in a list without max() and min().

  12. split() breaks the typed line into parts; int() turns each part into a number.

    Medium
  13. Sort a copy of the list: the third item from each end is the answer.

  14. Check each number and add to the right counter.

    Hard
  15. Go through the list until the item is found.

    Hard Rare

DICTIONARIES 10 programs

  1. A dictionary stores key: value pairs. Use the key in [ ] to get its value.

    Easy
  2. Assign to a new key to add, to an old key to change; del removes.

    Easy
  3. keys() gives all keys, values() all values, items() the pairs.

    Easy
  4. A for loop over a dictionary gives the keys; use them to get the values.

    Easy
  5. update() adds/changes many items; clear() empties; dict() makes a dictionary.

    Medium
  6. in checks the keys of a dictionary.

    Medium
  7. Create a dictionary to store names of states and their capitals.

  8. Create a dictionary of students with their marks in 5 subjects, and show each total.

  9. max() and min() on values() give the highest and lowest values; a loop finds whose they are.

  10. Use each letter as a key and its count as the value.

    Hard Rare

INTRODUCTION TO NUMPY 6 programs

  1. import numpy as np, then np.array(list). Arrays print without commas.

    Easy
  2. Each inner list becomes one row.

    Easy
  3. ndim: number of dimensions; shape: (rows, columns); size: number of items.

    Medium
  4. dtype= sets the type of every item; mixed types become one common type.

    Medium
  5. An operation on an array is done on every item, without a loop.

    Hard Rare
  6. The same * 2 repeats a list but doubles every value in an array.

    Hard Rare