★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
CBSE Class 11 · Computer Science 083 · Report file 2026-27
This Class 11 Computer Science practical file is laid out in the order you would submit it: cover, certificate, acknowledgement, index, then 25 Python programs with the screen each one produced. It covers all 15 lines of the CBSE suggested practical list for 2026-27, and every program is followed by the sentence you should be ready to say about it.
Live online · 25 programs run in Python 3.14 · 24 viva answers · your days and your timing · first class free
Start here
The Class 11 and 12 Computer Science course follows the 083 syllabus, so the file grows with the chapters. Python for Teens suits a student who wants more coding than the syllabus asks for, and MySQL gets Class 12 ready early.

This subject / 083
The full board syllabus with practical file programs, project guidance and viva preparation built in.
Open the course →
More Python / Teens
From the first print statement to games, web apps, data and a capstone, for students who finish the syllabus programs and want harder ones.
Open the course →
Towards Class 12 / SQL
SQL is not in Class 11 Computer Science, but it carries 20 theory marks in Class 12. This course starts from the first SELECT.
Open the course →Ans. The short version
A Class 11 Computer Science practical file for CBSE 083 must hold at least 20 Python programs and earns 7 of the 30 practical marks in 2026-27; the lab test is 12, the project 8 and the viva 3. The file usually has a cover, certificate, acknowledgement and index, then one entry per program: aim, code, output. This page gives 25 original programs that cover the whole official suggested list, each with real output. Modern Age Coders helps students write their own file in live one to one classes, and a priority demo lets you try a full class first.
Q1. What does CBSE ask for?
At least 20 Python programs. That is the wording in the CBSE Class XI curriculum for 2026-27, and it is for the report file alone: the project is marked separately.
| Practical component | Marks | What it means for you |
|---|---|---|
| Lab test: one Python program | 12 | 60% for logic, 20% for documentation, 20% for code quality, which works out to 7.2, 2.4 and 2.4 marks |
| Report file: minimum 20 Python programs | 7 | The practical file on this page |
| Viva voce | 3 | Spoken questions; be ready on every page of your own file |
| Project using most of the concepts learnt | 8 | A bigger program of your own, kept apart from the 20 |
| Total | 30 | Added to 70 marks of theory |
The suggested list has only 15 lines, which worries students who need 20. Count again: the pattern line holds three patterns, the series line holds four sums, the number line names three checks and one string line asks for two jobs. Written separately, those 15 lines become 23 programs, and that is how the index below reaches the minimum without any padding.
One more thing about level. The Class 11 syllabus does not list writing your own functions, exception handling or data files, so nothing on this page uses them. If a downloaded file is full of def and open(), it was made for Class 12. The Class 12 version is in our Class 12 practical file guide, and the rest of this year’s theory is in the Class 11 Computer Science notes.
Q2. What goes on the first pages?
Four front pages come before Program 1. CBSE does not print a layout for them, so a layout given by your teacher always wins. Where the school leaves it open, the wording below is safe to adapt; fill in the bracketed parts.
[Name of school]
Computer Science (083)
Report File: Python Programs
Session 2026-27
Submitted by: [name]
Class and section: XI [section]
Roll number: [number]
Submitted to: [teacher’s name]
Certified that [name], roll number [number] of Class XI [section], has written and executed the Python programs in this file in the computer laboratory of [school] during the session 2026-27, as required for Computer Science (083).
Date: [date]
Signature of subject teacher: [blank]
Signature of examiner: [blank]
School stamp: [blank]
I am grateful to [teacher’s name], who taught me to test a program before trusting it, and to [principal’s name] for the laboratory time in which this file was made. I also thank my classmates who ran my programs and told me where they broke.
[Your name], Class XI [section]
Program number and date at the top, then the aim in one sentence, the program with comments, and the output with the typed values visible.
Where a program makes a decision, paste two runs, one for each answer. Leave space for the teacher’s signature at the foot of the page.
Copy the first two columns into your own index and add Date, Page and Teacher’s signature. The third column shows which line of the CBSE list each entry answers.
| No. | Program | Where it comes from |
|---|---|---|
| 1 | Welcome message inside a border | Suggested list, line 1 |
| 2 | Larger and smaller of two numbers | Line 2 |
| 3 | Largest and smallest of three numbers | Line 3 |
| 4 to 6 | Three patterns with nested loops | Line 4, Patterns 1, 2 and 3 |
| 7 to 10 | Sums of four series in x and n | Line 5, four series |
| 11 | Perfect number | Line 6 |
| 12 | Armstrong number | Line 6 |
| 13 | Palindrome number | Line 6 |
| 14 | Prime or composite | Line 7 |
| 15 | Fibonacci terms up to a limit | Line 8 |
| 16 | GCD and LCM | Line 9 |
| 17 | Vowels, consonants, capitals, small letters | Line 10 |
| 18 | Palindrome string | Line 11 |
| 19 | Case conversion | Line 11 |
| 20 | Largest and smallest in a list and a tuple | Line 12 |
| 21 | Swap even and odd locations | Line 13 |
| 22 | Search in a tuple | Line 14 |
| 23 | Students above 75 | Line 15 |
| 24 | Employees and salaries | Syllabus, dictionary topic |
| 25 | math, random and statistics | Syllabus, modules topic |
Q3. What do Programs 1 to 10 look like?
The first ten entries read values, make a decision, draw three patterns and add four series. In the output boxes, whatever follows a prompt was typed at the keyboard; two runs in one box are separated by a blank line.
Aim: To input a welcome message and display it neatly.
# Program 1: welcome message inside a border
# Written by: <your name>, Class XI <section>, <date>
visitor = input("Your name: ")
message = input("Welcome message: ")
line = message + ", " + visitor
border = "*" * (len(line) + 4) # 2 characters on each side
print(border)
print("* " + line + " *")
print(border)
Your name: Ritika Welcome message: Good morning and welcome ************************************ * Good morning and welcome, Ritika * ************************************
To say in the viva: the border grows with the message because its length comes from len(). Multiplying a string by a number repeats it.
Aim: To input two numbers and display the larger and the smaller.
# Program 2: larger and smaller of two numbers
first = int(input("First number : "))
second = int(input("Second number: "))
if first == second:
print("Both numbers are the same")
else:
if first < second:
first, second = second, first # bigger first
print("Larger number :", first)
print("Smaller number:", second)
print("They differ by:", first - second)
First number : -18 Second number: 6 Larger number : 6 Smaller number: -18 They differ by: 24 First number : 40 Second number: 40 Both numbers are the same
To say in the viva: one tuple assignment puts the numbers in order, so only one pair of print lines is needed. The equal case is tested first; without it the program would claim that 40 is larger than 40.
Aim: To input three numbers and display the largest and the smallest.
# Program 3: largest and smallest of three numbers
p = float(input("Number 1: "))
q = float(input("Number 2: "))
r = float(input("Number 3: "))
# >= (not >) so that equal numbers are handled too
if p >= q and p >= r:
big = p
elif q >= r:
big = q
else:
big = r
if p <= q and p <= r:
small = p
elif q <= r:
small = q
else:
small = r
print("Largest :", big)
print("Smallest:", small)
Number 1: 36.6 Number 2: 38.2 Number 3: 37.1 Largest : 38.2 Smallest: 36.6 Number 1: 5 Number 2: 5 Number 3: 2 Largest : 5.0 Smallest: 2.0
To say in the viva: float() accepts body temperatures as well as whole numbers. The second run has a tie, and >= is what keeps the tie from falling into the wrong branch.
Aim: To print a triangle of stars using nested loops.
# Program 4: Pattern-1, a triangle of stars
height = int(input("How many rows? "))
row = 1
while row <= height:
star = 1
while star <= row: # row r has r stars
print("*", end="")
star += 1
print() # go to the next line
row += 1
How many rows? 5 * ** *** **** *****
To say in the viva: the outer loop chooses the row and the inner loop prints that row. end="" stops print from starting a new line after each star.
Aim: To print 12345, 1234, 123, 12, 1 using nested loops.
# Program 5: Pattern-2, numbers 1 to 5, one fewer each row
last = 5
while last >= 1:
for number in range(1, last + 1):
print(number, end="")
print()
last -= 1
12345 1234 123 12 1
To say in the viva: a while loop sits outside and a for loop inside; mixing the two kinds is allowed. The variable last is both the end of the row and the row counter.
Aim: To print A, AB, ABC, ABCD, ABCDE using nested loops.
# Program 6: Pattern-3, a triangle of letters
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
rows = int(input("Rows (1 to 26): "))
if rows < 1 or rows > 26:
print("Only 26 letters are available")
else:
for r in range(rows):
for position in range(r + 1):
print(letters[position], end="")
print()
Rows (1 to 26): 5 A AB ABC ABCD ABCDE Rows (1 to 26): 30 Only 26 letters are available
To say in the viva: the letters are picked from a string by index, so no ASCII codes are needed. The check at the top prevents an IndexError when someone asks for 30 rows.
Aim: To input x and n and print the sum of the first series.
# Program 7: sum of 1 + x + x^2 + x^3 + ... + x^n
x = int(input("x = "))
n = int(input("n = "))
term = 1 # the first term
series_sum = 0
for power in range(n + 1):
print("x ^", power, "=", term)
series_sum += term
term = term * x # next term = this term times x
print("Sum of the series =", series_sum)
x = 3 n = 4 x ^ 0 = 1 x ^ 1 = 3 x ^ 2 = 9 x ^ 3 = 27 x ^ 4 = 81 Sum of the series = 121
To say in the viva: each term is made from the one before it, so the program never uses the power operator. With x = 3 the terms are 1, 3, 9, 27 and 81, and they add to 121.
Aim: To input x and n and print the sum of the series with alternating signs.
# Program 8: sum of 1 - x + x^2 - x^3 + ... up to x^n
x = int(input("x = "))
n = int(input("n = "))
series_sum = 0
for power in range(n + 1):
if power % 2 == 0:
series_sum += x ** power # even power: add
else:
series_sum -= x ** power # odd power: subtract
print("Sum up to x ^", n, "=", series_sum)
x = 3 n = 4 Sum up to x ^ 4 = 61 x = 3 n = 5 Sum up to x ^ 5 = -182
To say in the viva: an even power is added and an odd power is subtracted, which power % 2 decides. The two runs end on different signs: 1 - 3 + 9 - 27 + 81 is 61, and taking away 243 leaves -182.
Aim: To input x and n and print the sum of the third series.
# Program 9: sum of x + x^2/2 + x^3/3 + ... + x^n/n
x = float(input("x = "))
n = int(input("n = "))
power_of_x = 1
series_sum = 0.0
k = 1
while k <= n:
power_of_x *= x # x, x^2, x^3, ...
term = power_of_x / k
series_sum += term
print("Term", k, "=", round(term, 4))
k += 1
print("Sum =", round(series_sum, 4))
x = 3 n = 4 Term 1 = 3.0 Term 2 = 4.5 Term 3 = 9.0 Term 4 = 20.25 Sum = 36.75
To say in the viva: the loop starts at 1 because the first term is x, not 1, and because dividing by 0 would stop the program. Printing the terms lets you check them on paper: 3, 4.5, 9 and 20.25.
Aim: To input x and n and print the sum of the factorial series.
# Program 10: sum of x + x^2/2! + x^3/3! + ... + x^n/n!
x = float(input("x = "))
n = int(input("n = "))
term = 1.0
series_sum = 0.0
for k in range(1, n + 1):
term = term * x / k # x^k / k! made from the last term
series_sum += term
print("Sum of", n, "terms =", round(series_sum, 4))
x = 3 n = 4 Sum of 4 terms = 15.375 x = 3 n = 15 Sum of 15 terms = 19.0855
To say in the viva: there is no factorial loop. Multiplying the last term by x / k gives the new term, because x^k/k! is the previous term times x divided by k.
Q4. Which number programs are on the list?
Lines 6 to 9 of the list name seven number tasks: perfect, Armstrong, palindrome, prime or composite, Fibonacci, GCD and LCM. Each program here prints its working, so a wrong answer can be traced to a line.
Aim: To determine whether a number is a perfect number.
# Program 11: is the number a perfect number?
number = int(input("Positive whole number: "))
factors = [] # proper factors only
for f in range(1, number // 2 + 1):
if number % f == 0:
factors.append(f)
print("Proper factors:", factors)
print("Their sum :", sum(factors))
if number > 0 and sum(factors) == number:
print(number, "is perfect")
else:
print(number, "is not perfect")
Positive whole number: 496 Proper factors: [1, 2, 4, 8, 16, 31, 62, 124, 248] Their sum : 496 496 is perfect Positive whole number: 18 Proper factors: [1, 2, 3, 6, 9] Their sum : 21 18 is not perfect
To say in the viva: no proper factor of a number can be bigger than half of it, so the loop ends at number // 2. For 496 the nine factors add back to 496.
Aim: To determine whether a number is an Armstrong number.
# Program 12: is the number an Armstrong number?
text = input("Positive whole number: ")
how_many = len(text) # the power to use
total = 0
for ch in text: # one digit at a time
value = int(ch) ** how_many
print(ch, "^", how_many, "=", value)
total += value
print("Sum of powers =", total)
if total == int(text):
print("Armstrong number")
else:
print("Not an Armstrong number")
Positive whole number: 8208 8 ^ 4 = 4096 2 ^ 4 = 16 0 ^ 4 = 0 8 ^ 4 = 4096 Sum of powers = 8208 Armstrong number Positive whole number: 124 1 ^ 3 = 1 2 ^ 3 = 8 4 ^ 3 = 64 Sum of powers = 73 Not an Armstrong number
To say in the viva: the number is kept as a string, so each character is one digit and len() gives the power. 8208 has four digits, so its digits are raised to the power 4, not 3.
Aim: To determine whether a number is a palindrome.
# Program 13: is the number a palindrome?
text = input("Whole number: ")
left = 0
right = len(text) - 1
same = True
while left < right:
if text[left] != text[right]:
same = False
break # one mismatch is enough
left += 1
right -= 1
if same:
print(text, "reads the same both ways: palindrome")
else:
print(text, "is not a palindrome: digits", text[left],
"and", text[right], "differ")
Whole number: 70407 70407 reads the same both ways: palindrome Whole number: 52335 52335 is not a palindrome: digits 2 and 3 differ
To say in the viva: two index variables walk inwards from the ends, and break stops at the first pair that differs. Nothing is reversed, so no second copy of the number is stored.
Aim: To input a number and check whether it is prime or composite.
# Program 14: prime or composite
number = int(input("Whole number: "))
if number < 2:
print(number, "is neither prime nor composite")
else:
divisor = 2
while number % divisor != 0: # stops at first factor
divisor += 1
if divisor == number:
print(number, "is prime")
else:
print(number, "is composite")
print("because", divisor, "x", number // divisor,
"=", number)
Whole number: 97 97 is prime Whole number: 221 221 is composite because 13 x 17 = 221 Whole number: 1 1 is neither prime nor composite
To say in the viva: the while loop always ends, because a number divides itself. If the first divisor found is the number itself, it is prime. 1 is neither, and it needs its own test.
Aim: To display the terms of the Fibonacci series up to a limit.
# Program 15: Fibonacci terms up to a limit
limit = int(input("Show terms up to: "))
series = []
current = 0
following = 1
while current <= limit:
series.append(current)
upcoming = current + following
current = following
following = upcoming
print("Terms:", series)
print("Number of terms:", len(series))
Show terms up to: 60 Terms: [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55] Number of terms: 11 Show terms up to: 0 Terms: [0] Number of terms: 1
To say in the viva: the limit is a value, not a count, so a while loop fits better than a for loop. upcoming must be worked out before current is overwritten.
Aim: To compute the greatest common divisor and least common multiple of two integers.
# Program 16: GCD and LCM of two positive integers
m = int(input("First integer : "))
n = int(input("Second integer: "))
# GCD: try every number downwards, stop at the first hit
gcd = min(m, n)
while m % gcd != 0 or n % gcd != 0:
gcd -= 1
# LCM: try the multiples of the bigger number
lcm = max(m, n)
while lcm % m != 0 or lcm % n != 0:
lcm += max(m, n)
print("GCD =", gcd)
print("LCM =", lcm)
print("Check: GCD x LCM =", gcd * lcm, "and m x n =", m * n)
First integer : 18 Second integer: 48 GCD = 6 LCM = 144 Check: GCD x LCM = 864 and m x n = 864 First integer : 9 Second integer: 16 GCD = 1 LCM = 144 Check: GCD x LCM = 144 and m x n = 144
To say in the viva: both answers come straight from their definitions: the first common divisor going down and the first common multiple going up. The last line is a check: GCD times LCM must equal the product of the two integers. Enter positive integers; a zero would mean dividing by zero.
Programs about converting numbers between bases are not on this list, but the conversions themselves are in Unit 1 and done by hand; they are worked on number system conversion for Class 11.
Q5. Which entries cover strings, lists and dictionaries?
Entries 17 to 23 finish the suggested list. Entries 24 and 25 come from the topics of Unit 2, so the file also shows dictionary methods and the three modules the syllabus names.
Aim: To count vowels, consonants, uppercase and lowercase characters in a string.
# Program 17: vowels, consonants, capitals, small letters
sentence = input("Type a sentence: ")
capitals = small = vowel_count = other = 0
for ch in sentence:
if ch.isupper():
capitals += 1
elif ch.islower():
small += 1
else:
other += 1 # digits, spaces, symbols
if ch in "aeiouAEIOU":
vowel_count += 1
letters = capitals + small
print("Vowels :", vowel_count)
print("Consonants :", letters - vowel_count)
print("Uppercase letters:", capitals)
print("Lowercase letters:", small)
print("Everything else :", other)
Type a sentence: Room 12B opens at 9 AM Vowels : 6 Consonants : 8 Uppercase letters: 4 Lowercase letters: 10 Everything else : 8
To say in the viva: consonants are not counted directly; they are letters minus vowels. Spaces and digits land in the last counter, so all 22 characters of the sentence are accounted for.
Aim: To input a string and determine whether it is a palindrome.
# Program 18: is the string a palindrome?
phrase = input("Word or phrase: ")
backwards = ""
forwards = ""
for ch in phrase:
if ch.isalnum(): # ignore spaces and commas
forwards = forwards + ch.lower()
backwards = ch.lower() + backwards
print("Compared:", forwards, "with", backwards)
if forwards != "" and forwards == backwards:
print("Palindrome")
else:
print("Not a palindrome")
Word or phrase: Was it a car or a cat I saw? Compared: wasitacaroracatisaw with wasitacaroracatisaw Palindrome Word or phrase: Notebook Compared: notebook with koobeton Not a palindrome
To say in the viva: writing ch + backwards puts each new character in front, which reverses the phrase without slicing. isalnum() drops the spaces and the question mark before comparing.
Aim: To convert the case of the characters in a string.
# Program 19: convert the case of every character
original = input("Text: ")
changed = ""
for ch in original:
if ch.isupper():
changed += ch.lower()
elif ch.islower():
changed += ch.upper()
else:
changed += ch # digits and spaces stay
print("Case changed :", changed)
print("All capitals :", original.upper())
print("First capital:", original.capitalize())
Text: rEPORT fILE 2027 Case changed : Report File 2027 All capitals : REPORT FILE 2027 First capital: Report file 2027
To say in the viva: strings are immutable, so a new string is built character by character. The last line shows the difference between capitalize(), which touches one letter, and upper(), which touches all.
Aim: To find the largest and the smallest number in a list and in a tuple.
# Program 20: largest and smallest in a list and a tuple
entries = input("Numbers with spaces: ").split()
heights = []
for e in entries:
heights.append(int(e))
high = low = 0 # positions, not values
for i in range(1, len(heights)):
if heights[i] > heights[high]:
high = i
if heights[i] < heights[low]:
low = i
print("List :", heights)
print("Largest :", heights[high], "at index", high)
print("Smallest:", heights[low], "at index", low)
fixed = tuple(heights) # same check on a tuple
print("Tuple :", fixed, "max", max(fixed), "min", min(fixed))
Numbers with spaces: 158 171 149 165 171 List : [158, 171, 149, 165, 171] Largest : 171 at index 1 Smallest: 149 at index 2 Tuple : (158, 171, 149, 165, 171) max 171 min 149
To say in the viva: the loop remembers positions rather than values, so it can also report where the answer is. 171 appears twice; > keeps the first position, and >= would report index 4.
Aim: To input a list of numbers and swap elements at even locations with those at odd locations.
# Program 21: swap even locations with odd locations
count = int(input("How many numbers? "))
values = []
for i in range(count):
values.append(int(input("Value at index " + str(i) + ": ")))
print("Before:", values)
i = 0
while i + 1 < count: # a pair must exist
temp = values[i]
values[i] = values[i + 1]
values[i + 1] = temp
i += 2
print("After :", values)
How many numbers? 5 Value at index 0: 11 Value at index 1: 22 Value at index 2: 33 Value at index 3: 44 Value at index 4: 55 Before: [11, 22, 33, 44, 55] After : [22, 11, 44, 33, 55]
To say in the viva: the condition i + 1 < count asks whether a partner exists. With five values, 55 has no partner and stays where it is.
Aim: To search for a given element in a tuple.
# Program 22: search for an element in a tuple
stock = ("pen", "ruler", "eraser", "pen", "stapler")
print("Tuple:", stock)
wanted = input("Item to find: ").strip().lower()
places = []
for i in range(len(stock)):
if stock[i] == wanted:
places.append(i) # keep every match
if len(places) == 0:
print(wanted, "is not in the tuple")
else:
print(wanted, "found", len(places), "time(s), index", places)
Tuple: ('pen', 'ruler', 'eraser', 'pen', 'stapler')
Item to find: Pen
pen found 2 time(s), index [0, 3]
Tuple: ('pen', 'ruler', 'eraser', 'pen', 'stapler')
Item to find: compass
compass is not in the tuple
To say in the viva: this is linear search, and it does not stop at the first match because an item can appear more than once. strip() and lower() forgive the stray spaces and the capital P in the first run.
Aim: To create a dictionary with the roll number, name and marks of n students and display the names of those above 75.
# Program 23: names of students with marks above 75
register = {} # roll number : [name, marks]
n = int(input("Students in class: "))
while len(register) < n:
roll = int(input("Roll no: "))
if roll in register:
print("Roll", roll, "is already entered")
else:
name = input("Name : ")
marks = int(input("Marks : "))
register[roll] = [name, marks]
print("Above 75:")
count = 0
for roll in register:
if register[roll][1] > 75:
print(roll, register[roll][0])
count += 1
print(count, "of", n, "students")
Students in class: 3 Roll no: 11 Name : Farhan Marks : 75 Roll no: 11 Roll 11 is already entered Roll no: 12 Name : Lavanya Marks : 76 Roll no: 13 Name : Joel Marks : 90 Above 75: 12 Lavanya 13 Joel 2 of 3 students
To say in the viva: the roll number is the key because no two students share one, and a repeated roll number is refused. Farhan has exactly 75, which is not above 75, so his name is not printed.
Aim: To create a dictionary of employees with their salaries and access them.
# Program 24: employees and salaries in a dictionary
names = ("Gauri", "Imran", "Peter")
pay = dict.fromkeys(names, 30000) # same starting salary
print(pay)
pay.update({"Imran": 34500, "Sunita": 41000})
pay.setdefault("Peter", 99999) # key exists: no change
print(pay)
who = input("Salary of which employee? ")
print(who, ":", pay.get(who, "no such employee"))
for name in sorted(pay):
print(name, "x" * (pay[name] // 5000), pay[name])
print("Highest:", max(pay.values()), "Lowest:", min(pay.values()))
{'Gauri': 30000, 'Imran': 30000, 'Peter': 30000}
{'Gauri': 30000, 'Imran': 34500, 'Peter': 30000, 'Sunita': 41000}
Salary of which employee? Imran
Imran : 34500
Gauri xxxxxx 30000
Imran xxxxxx 34500
Peter xxxxxx 30000
Sunita xxxxxxxx 41000
Highest: 41000 Lowest: 30000
To say in the viva: setdefault() adds a key only if it is missing, so Peter keeps 30000. get() takes a second value to return when the name is not a key.
Aim: To use functions of the math, random and statistics modules.
# Program 25: math, random and statistics modules
import math
import statistics
from random import randint
throws = []
for i in range(12):
throws.append(randint(1, 6)) # one roll of a die
print("Throws :", throws)
print("Mean :", round(statistics.mean(throws), 2))
print("Median :", statistics.median(throws))
print("Mode :", statistics.mode(throws))
print("Boxes of 5 needed for 12 dice:", math.ceil(12 / 5))
Throws : [5, 4, 2, 4, 5, 2, 4, 5, 6, 6, 3, 1] Mean : 3.92 Median : 4.0 Mode : 5 Boxes of 5 needed for 12 dice: 3
To say in the viva: this is one real run; yours will show other numbers, because randint(1, 6) picks afresh each time and includes both 1 and 6. math.ceil(2.4) is 3, since a part box is still a box.
Want a different program for the same aim, so that your file does not match a friend’s? The blog has 51 Python programs for Class 11 written another way. Students of Informatics Practices need a different file, with SQL in it: see the Class 11 IP practical file.
Q6. What can they ask you?
The viva carries 3 marks and CBSE publishes no list of questions for it. A sensible plan is to prepare in two rounds: your own programs first, then the Python ideas behind them.
first, second = second, first do? It swaps the two values in one step. The right side is packed as a tuple before anything is assigned, so no third variable is needed.int() and only adds and multiplies. Program 9 reads a float and divides, and / gives a float even for 6 / 3.int(text) needed on the last test of Program 12? total is an integer and text is a string. Comparing them without converting is always False.series and why? A list. The number of terms is not known beforehand and a list can grow with append().min(m, n)? No common divisor can be larger than the smaller number.tuple().register[roll][1] mean? The value for that roll number is a list, and index 1 of the list holds the marks.7 / 2 is 3.5 and 7 // 2 is 3. Floor division goes down, so -7 // 2 is -4."5" * 3 is 555, which is why numbers are converted with int() or float().int("12.5")? A ValueError, because the text is not a whole number. float("12.5") works.s[0] = "t" on a string raises a TypeError.find() returns -1 and index() raises a ValueError.(4,). Without it, (4) is just an integer.range(2, 11, 3) give? 2, 5 and 8. The stop value is never included.== compares values; is checks whether two names refer to the same object. After b = a for a list, a is b is True and a change through b shows in a.math.pow(3, 2) and 3 ** 2? The function returns the float 9.0; the operator on two integers returns the integer 9.break leaves the loop at once. continue skips the rest of this pass and goes to the next one.Written versions of these ideas, set as an annual exam, are in the Class 11 Computer Science sample paper.
Q7. How do you turn this into your own file?
Type it, change it, run it, then print it. A file you cannot explain costs marks twice, once in the viva and again in the lab test, where you write a program with nothing to copy from.
Save it as a script with a plain name such as p11_perfect.py. Typing shows you the colons, brackets and indents your eye skips when reading.
Use your own variable names and your own inputs, and write the comments in words you would say aloud. If a line cannot be explained, it should not be in the file.
Try a tie, a zero, an empty string, a repeated roll number. Keep the awkward run as your second output, because it shows the program was tested.
An aim line at the top, names that say what they hold, and a comment wherever a reader would ask why. Those habits are worth 20% for documentation and 20% for code quality.
Paste code and output into a document, put the index in front and export it. To keep this page as a reference PDF, use your browser’s Print command and choose Save as PDF.
In a live class the student shares the screen and writes the entry while the teacher asks the questions an examiner could ask. The 8-mark project is planned the same way, and a full example is on the Class 11 Computer Science project page. Still choosing between subjects? Read CS or IP in Class 11.
One to one, with a demo first
You can try before enrolling. The priority demo is a paid full live class at a slot you pick, with a written skill report afterwards, and its fee is adjusted against the first month if you enrol. There is a free demo class too. Regular classes are personalised one to one, billed monthly, with no admission fee.
Before you enrol · Try a class
a full live class of about 45 to 60 minutes
The classes · Choose your own timing
₹4,999
per month, 4 private classes, fully flexible timingtwo private classes a week, at a time set with you
A student who codes comfortably may need only a few sessions to finish the file and rehearse the viva. One who began Python this year does better with weekly classes, so the file, theory and project move together. Your monthly fee is shown above in your own currency.
CBSE schools abroad
A CBSE school in Dubai, Muscat or Kathmandu follows the same Class 11 curriculum, so the file needs the same 20 programs. Class times are fixed one to one after school hours where you live.
| Where you live | Time difference | Usual class window, local time | Format |
|---|---|---|---|
| India every Indian city | Indian time | Any time you choose | Personalised 1-on-1 |
| UAE and Oman Dubai, Abu Dhabi, Sharjah, Muscat | 1 h 30 min behind India | 3:00 PM to 9:00 PM | Personalised 1-on-1 |
| Saudi Arabia, Qatar, Kuwait, Bahrain Riyadh, Jeddah, Dammam, Doha, Kuwait City, Manama | 2 h 30 min behind India | 3:00 PM to 9:00 PM | Personalised 1-on-1 |
| Nepal Kathmandu | 15 min ahead of India | 4:30 PM to 9:00 PM | Personalised 1-on-1 |
| Ethiopia and East Africa Addis Ababa and East Africa Time | 2 h 30 min behind India | 4:30 PM to 9:00 PM | Personalised 1-on-1 |
| Singapore and Malaysia Singapore, Kuala Lumpur | 2 h 30 min ahead of India | 3:30 PM to 9:00 PM | Personalised 1-on-1 |
Class 11 submission dates are set by each school, in India and abroad, so tell us yours at the demo and the entries are planned backwards from it. Regular tuition is described on CBSE Class 11 Computer Science classes.
What families say
Real reviews from real families. We neither write nor commission them.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
The rest of the Class 11 series
Every page in the CBSE Class 11 Computer Science, IP and AI series, grouped by what you need.
CBSE Class 12 Computer Science (083): Class 12 CS viva questions Class 12 CS sample paper practice Class 12 CS project with source code Class 12 CS important questions
CBSE Class 12 Informatics Practices (065): Class 12 IP practical file Class 12 IP project with source code Class 12 IP sample paper practice Class 12 IP important questions
CBSE Class 12 Information Technology (802): IT 802 practical and project file IT 802 Java notes and programs IT 802 notes
ISC Computer Science (868): ISC Class 12 CS syllabus 2027 ISC Class 12 CS practice paper ISC Class 12 practical questions solved ISC Boolean algebra and K-maps
Program lists with output: Python programs for Class 11 Python project ideas
Practical file questions
A minimum of 20 Python programs, as stated in the CBSE Class XI Computer Science (083) curriculum for 2026-27. The file carries 7 marks. Two or three extra entries are a good idea, because one rejected program then does not take you below the minimum. This page has 25.
Open this page, choose Print in your browser and select Save as PDF to keep all 25 programs with output. Use that copy for reference only. The file you submit should be typed and run by you, with your own inputs, since the viva and lab test check whether you understand it.
No. The 2026-27 curriculum for Class 11 Computer Science asks for Python programs only, and databases come in Class 12. Class 11 Informatics Practices is different: that file needs at least 14 Python programs and 14 SQL queries.
The curriculum document does not say, so follow your school. Many students print code and output and write the aim by hand, but a teacher may want either. Whichever it is, the output should come from a program you actually ran.
Cover page, certificate, acknowledgement and index, followed by one entry per program. Each entry has a number, date, aim, commented code and output. CBSE fixes the number of programs and the marks, not the decoration, so use the layout your school gives if there is one.
Out of 30 in 2026-27: lab test 12, report file 7, project 8 and viva 3. The lab test is one Python program judged 60% on logic, 20% on documentation and 20% on code quality. Theory carries the other 70 marks.
No. User-defined functions, exception handling and data files are not listed in the Class 11 Computer Science syllabus for 2026-27; they belong to Class 12. Use conditions, loops, strings, lists, tuples, dictionaries and the math, random and statistics modules.
There is no official list. Prepare to explain any line of your own file, trace a loop for a given input, and answer basics such as the difference between list and tuple, / and //, find() and index(), or == and is. This page has 24 questions with short answers.
Each school sets its own date, because the Class 11 annual examination is held by schools and not by the board. Ask your teacher for the file submission date and the practical date separately, as they are often different days.
Reading solutions is fine; submitting them unread is the problem. Retype the idea with your own names and inputs, then close the page and write it again from memory. If you can do that, it is ready for the lab test as well as the file.
Yes. In our live one to one classes the student writes and runs every program while the teacher explains and questions; we do not write the file for anyone. You can start with a priority demo at a slot you pick, or with the free demo class.
Start
Bring the program that will not work, or pick any number from the index above. In the demo class your child writes it live, tests it with two inputs and explains it aloud, and you hear afterwards what the file, the lab test and the viva still need.
If the submission date is close, book a priority demo: you choose the slot, a written skill report follows, and the fee is adjusted against the first month if you enrol.
WhatsApp us · +91 91233 66161 · connect@modernagecoders.com
Every class is live video. The form requests a callback and reserves nothing.
A full live class of about 45 to 60 minutes at a slot you pick, with a written skill report and learning roadmap on WhatsApp afterwards. The fee is adjusted against your first month if you enrol.
Book a priority demo