Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views34 pages

CS Pratical File

The document is a project file for Computer Science for Grade XI at Hosur Public School, detailing various programming tasks and exercises for the academic year 2025-2026. It includes a bonafide certificate, acknowledgments, an index of programming exercises, and sample code for each task. The tasks cover a range of Python programming concepts such as input/output, conditionals, loops, and data structures.

Uploaded by

sathyasai728573
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views34 pages

CS Pratical File

The document is a project file for Computer Science for Grade XI at Hosur Public School, detailing various programming tasks and exercises for the academic year 2025-2026. It includes a bonafide certificate, acknowledgments, an index of programming exercises, and sample code for each task. The tasks cover a range of Python programming concepts such as input/output, conditionals, loops, and data structures.

Uploaded by

sathyasai728573
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Hosur Public School

Senior Secondary School


CBSE - Affiliation No. 1930604, School Code: 55503
Rayakottai Highways, Karapalli, Hosur – 635109
Krishnagiri District, Tamilnadu

SUBJECT: COMPUTER SCIENCE

GRADE: XI (Subject Code: (083)


PROJECT FILE
2025 – 2026

Submitted By:
Name of the Candidate :
Register Number :
Project Topic :
COMPUTER SCIENCE (083)
PROJECT REPORT FILE (2025 – 2026)

BONAFIDE CERTIFICATE

This is to certify that the Project Work entitled

is a Bonafide record of work done

by partial fulfillment for the award of Grade

XI during the Academic year 2025 – 2026.

Teacher In charge

Submitted for AISSCE Practical Examination held on

at Hosur Public School – Hosur.

Register Number:

Internal Examiner External Examiner

Principal
ACKNOWLEDGEMENT
I would like to take this opportunity to express my deep sense of
gratitude to all those people without whom this project could have never
been completed. First and foremost, I like to thank God for giving me
such a great opportunity to work on this project, and I would like to
express my special thanks and gratitude to the Management, the Directors
and the Correspondent of Hosur Public School, for their constant
guidance and providing a very nice platform to learn.
I would also like to thank our Principal – Ms. Sindhu Anoop, Hosur
Public School, for her constant encouragement and moral support without
which I would have never be able to give my best.
I would also like to thank Ms.E.Naveetha, Computer Science
Teacher, Hosur Public School, who gave me the wonderful opportunity to
do this project, which also helped me in doing a lot of research and I
came to know about so many new things from this study I am really
thankful to all.
INDEX
Pr. Date Topic Page Teacher’s
No No sign
1 Write a python program to input a welcome message and display it.
2 Write a python program to input two numbers and display the larger /
smaller number.
3 Write a python program to input three numbers and display the largest
/smallest number.
4 Generate the following patterns using nested loop.

5 Write a program to input the value of x and n and print the sum of the
following series:
a. 1 + x2 + x3 + ... + xn
b. x - x2/2! + x3/3! - x4/4! + x5/5! - x6/6!
6 Write a program to determine whether a number is a perfect number,
an
Armstrong number or a palindrome.
7 Write a program to input a number and check if the number is a prime
or composite number.
8 Write a program to display the n terms of a Fibonacci series.
9 Write a python program to compute the greatest common divisor and
least common multiple of two integers.
10 Write a program to count and display the number of vowels,
consonants,
uppercase, lowercase characters in string.
11 Write a menu driven program for list manipulation. Display menu as:
Add a record
View record
Delete Record
Modify record
Exit
12 Write a menu drive program to the following from the list:
Maximum
Minimum
Sum 3
Sort in Ascending
Sort in Descending
Exit
13 Write a program to input a list of numbers and swap elements at the
even location with the elements at the odd location.
14 Write a program to input a list of number and interchange first element
to last element.
15 Write a program to create a tuple with user input and search for given
element.
16 Write a program to create tuple with user input and display the square
of numbers divisible by 3 and display cube of numbers divisible by 5.
17 Write a menu driven program to do the following using a dictionary.
Display Contacts
Add Contact
Delete a Contact
Change a phone number
Search Contact
Exit
18 Write a program to Create a dictionary with the roll number, name and
marks of n students in a class and display the names of students who
have scored marks above 75.
19 Write a program to create a dictionary and store salesman name as a
keyand sales of 3 months as values. Give the bonus to the salesman
according to the given criteria:
Total Sales < 10K – No Bonus
Total Sales 10K to 20K – 5%
Total Sales 21K to 30K – 8%
Total Sales 31K to 40K – 10%
20 Write a program to enter a team name, wins and losses of a team.
Storethem into a dictionary where teams names are key and winds and
lossesare values stored as a list. Do the following based on the
dictionary created above:
Find out the team’s winning percentage by their names
Display the no. of games won by each team in a list
Display the no. of games lost by each team in a list

4
Ex.No:- 1 Date:-

PROGRAM TO INPUT A WELCOME MESSAGE AND DISPLAY IT

Aim:

Write a Python program to input a welcome message and display it.

Coding:

wl_msg = input(“Enter the welcome message:”)


print(wl_msg)

Output:

Result:-
The expected output has been achieved.

5
Ex.No:- 2 Date:-
PROGRAM TO INPUT TWO NUMBERS AND DISPLAYTHE LARGER / SMALLER
NUMBER
Aim:

Write a python program to input two numbers and display the larger / smaller number.

Coding:

n1=int(input("Enter the first number to check:"))


n2=int(input("Enter the second number to check:"))
if n1>n2:
print(n1," is larger.")
elif n2>n1:
print(n2," is larger")
else:
print("You have entered equal number.")
if n1<n2:
print(n1," is smaller.")
elif n2<n1:
print(n2," is smaller")
else:
print("You have entered equal number.")

Output:

Result:-
The expected output has been achieved.

6
Ex.No :- 3 Date:-
PROGRAM TO INPUT THREE NUMBERS AND DISPLAYTHE LARGEST / SMALLEST

NUMBER

Aim:
Write a python program to input three numbers and display the largest / smallest number.

Coding:

n1=input("Enter the first number to check:")


n2=input("Enter the second number to check:")
n3=input("Enter the third number to check:")
if n1>n2 and n1>n3:
print(n1," is largest.")
elif n2>n1
and n2>n3:
print(n2," is largest")
elif n3>n1 and n3>n2:
print(n3," is largest")
else:
print("You have entered equal number.")
if n1<n2 and n1<n3:
print(n1," is smallest.")
elif n2<n1 and n2<n3:
print(n2," is smallest")
elif n3<n1 and n3<n2:
print(n3," is smallest")
else:
print("You have entered equal number.")

Output:

Result:-

The expected output has been achieved.

7
Ex.No:- 4 Date:-

PROGRAM TO CALCULATE PERIMETER/CIRCUMFERENCE ANDAREA OF


SHAPES
Aim:
Generate the following patterns using nested loop.

Coding:

#Code For Pattern1


For i in range(1,6):
for j in range(1,i+1):
print("*",end=" ")
print()

#Code for Pattern2


fori in range(6,1,-1):
for j in range(1,i):
print(j,end=" ")
print()

#code for pattern 3


fori in range (65,70):
for j in range(65,i+1):
print(chr(j),end="")
print()

Output:

Result:-

The expected output has been achieved.

8
Ex.No:- 5 Date:-
PROGRAM TO CALCULATE SIMPLE AND COMPOUND INTEREST

Aim:

Write a program to input the value of x and n and print the sum of the following series:

Coding:

x = float (input ("Enter value of x :"))


n= int (input ("Enter value of n :"))
s=0
#Series 1
for i in range (n+1) :
s += x**iif i<n:

else:

#Series 2
sum = 0
m=1

print(x**i,"+",end=" ")

print(x**i,end=" ")print ("=", s)


for i in range(1, 7) :
f=1
for j in range(1, i+1) :
f *= j
t = x ** i / f
if i==1:
print(int(t),end=" ")
elif i%2==0:
print("-",int(t),end=" ")
else:
print("+",int(t),end=" ")
sum += t * m
m = m * -1 print(" =", sum)

9
Output:

Result:-

The expected output has been achieved.

10
Ex.No:- 6 Date:-

PROGRAM TO DETERMINE WHETHER A NUMBER IS A PERFECT


NUMBER, AN ARMSTRONG NUMBER OR A PALINDROME.

Aim:
Write a program to determine whether a number is a perfect number, an Armstrongnumber or a
palindrome.
Coding:

n = int(input("Enter any number to check whether it is perfect ,armstrong or palindrome : “))


sum = 0# Check for perfect number
for i in range(1,n):

if n% i==0:
sum = sum + i
if sum == n :
print( n,"is perfect number")

else :

print( n, "is not perfect number")


#check for armstrong number
temp = n
total = 0
while temp > 0 :

digit = temp %10


total = total + (digit**3)

temp =temp//10
if n == total:
print( n,"is an armstrong number")

else :

print( n, "is not armstrong number")


#check for palindrome number
temp = n
rev = 0
while n > 0:
11
d = n % 10

rev = rev *10 + dn = n//10


if temp == rev :
print( temp,"is palindrome number")
else :
print( temp, "is not palindrome number")

12
Output:

Result:-

The expected output has been achieved.

13
Ex.No:- 7 Date:-

PROGRAM TO CHECK IF THE NUMBER IS A PRIME OR COMPOSITE

Aim:
Write a program to input a number and check if the number is a prime or composite number.
Coding:

n=int(input("Enter number to check:"))


if n>1:
for i in range(2,n):
if n% i==0:
f=1
break
else:
f=0
elif n==0 or n==1:
print(n, " is not a prime number nor composite number")
else:
print(n," is a composite number")
if f==1:
print(n, " is not a prime number")
else:
print(n," is a prime number")

Output:

Result:-

The expected output has been achieved.

14
Ex.No:- 8 Date:-

PROGRAM TO DISPLAY THE FIBONACCI SERIES


Aim:

Write a program to display the n term Fibonacci series.

Coding:

nterms = int(input("Enter no. of terms to display: "))

n1, n2 = 0, 1

count = 0

if nterms <= 0:

print("Please enter a positive integer")

elif nterms == 1:

print("Fibonacci sequence upto",nterms,":")

print(n1, end=" ")

else:

print("Fibonacci sequence:")

while count < nterms:

print(n1)

nth = n1 + n2

n1 = n2

n2 = nth
count += 1

15
Output:

Result:-

The expected output has been achieved.

16
Ex.No:- 9 Date:-

PROGRAM TO FIND GCD AND LCM OF TWO NUMBERS


Aim:
Write a python program to compute the greatest common divisor and least commonmultiple of
two integers.

Coding:

fn = int(input('Enter first number: '))


sn = int(input('Enter second number: '))
gcd = 1
for i in range(1,fn +1):
if fn% i==0 and sn% i==0:
gcd = i
print('HCF or GCD of %d and %d is %d' %(fn, sn,gcd))
lcm = fn * sn/ gcd
print('LCM of %d and %d is %d' %(fn, sn, lcm))

Output:

Result:-

The expected output has been achieved.

17
Ex.No:- 10 Date:-

PROGRAM TO COUNT AND DISPLAY THE NUMBER OF VOWELS, CONSONANTS,


UPPERCASE, LOWERCASE CHARACTERS IN STRING

Aim:

Write a program to count and display the number of vowels, consonants, uppercase,lowercase
characters in string.

Coding:

txt = input("Enter Your String : ")


v = c = uc = lc = 0
v_list = ['a','e','i','o','u']
for i in txt:
if i in v_list:
v += 1
if i not in v_list:
c += 1
if i.isupper():
uc += 1
if i.islower():
lc += 1
print("Number of Vowels in this text = ", v)
print("Number of Consonants in this text = ", c)
print("Number of Uppercase letters in this text=", uc)
print("Number of Lowercase letters in this text=", lc)

Output:

Result:-

The expected output has been achieved.

18
Ex.No:- 11 Date:-

PROGRAM TO IMPLEMENT LIST MANIPULATION

Aim:
Write a menu driven program for list manipulation. Display menu as:
1. Add a record
2. View record
3. Delete Record
4. Modify record
5. Exit

Coding:

l=[]
while True:
print('''1. Add a record
2. View record
3. Delete Record
4. Modify record
5. Exit''')
ch=int(input("Enter your choice:"))

if ch==1:
v=int(input("Enter value to add a record:"))
l.append(v)
print("Record Added...")
print("List after insertion:",l)
elif ch==2:
print(l)
elif ch==3:
n=int(input("Enter the value to delete:"))
l.remove(n)
print("Record Deleted...")
print("List after deletion:",l)
elif ch==4:
i=int(input("Enter position to modify the value:"))
nv=int(input("Enter new value to modify:"))

19
l[i]=nv
print("Record Modified...")

print("List after modification")


elif ch==5:
print("Thank you! Good Bye")
break

Output:

Result:-

The expected output has been achieved.

20
Ex.No:- 12 Date:-
PROGRAM TO IMPLEMENT LIST FUNCTIONS

Aim:
Write a menu drive program to the following from the list:
1. Maximum
2. Minimum
3. Sum
4. Sort in Ascending
5. Sort in Descending
6. Exit
Coding:

l=[11,32,5,43,22,98,67,44]
while True:
print('''
1. Maximum
2. Minimum
3. Sum
4. Sorting (Ascending)
5. Sorting (Descending)
6. Exit
''')
ch=int(input("Enter your choice:"))
if ch==1: print("Maximum:",max(l))
elif ch==2:
print("Minimum:",min(l))
elif ch==3:
print("Sum:",sum(l))
elif ch==4:
l.sort()
print("Sorted list(Ascending):",l)
elif ch==5:
l.sort(reverse=True)
print("Sorted List(Descending:)",l)
elif ch==6:
print("Thank you! Good Bye")break

21
Output:

Result:-

The expected output has been achieved.

22
Ex.No:- 13 Date:-

PROGRAM TO IMPLEMENT SWAPPING IN LIST

Aim:
Write a program to input a list of numbers and swap elements at the even location with theelements
at the odd location.

Coding:

l=eval(input("Enter a list: "))


print("Original List before swapping :",l)
s=len(l)

if s%2!=0:
s=s-1
for i in range(0,s,2):

l[i],l[i+1]=l[i+1],l[i]
print("List after swapping the values :",l)

Output:

Result:-

The expected output has been achieved.

23
Ex.No:- 14 Date:-

PROGRAM TO INPUT A LIST OF NUMBER AND INTERCHANGEFIRST


ELEMENT TO LAST ELEMENT

Aim:
Write a program to input a list of number and interchange first element to last element.

Coding:

l=eval(input("Enter a list: "))


t=l[0]
l[0]=l[-1]
l[-1]=t
print(l)

Output:

Result:-

The expected output has been achieved.

24
Ex.No:- 15 Date:-

PROGRAM TO CREATE A TUPLE WITH USER INPUTAND SEARCH


FOR GIVEN ELEMENT

Aim:
Write a program to create a tuple with user input and search for given element.

Coding:

t=eval(input("Enter tuple here:"))

n=int(input("Enter element to search:"))

if n in t:

print("Found:",n)

else:

print("Tuple doesn't contain ",n)

Output:

Result:-

The expected output has been achieved.

25
Ex.No:- 16 Date:-

PROGRAM TO CREATE TUPLE WITH USER INPUT

Aim:
Write a program to create tuple with user input and display the square of numbers divisibleby 3 and
display cube of numbers divisible by 5.

Coding:

t=eval(input("Enter tuple here:"))


for i in t:
if i%3==0:
print(i**2,end=' ')
if i%5==0:
print(i**3,end=' ')

Output

Result:-

The expected output has been achieved.

26
Ex.No:- 17 Date:-

MENU DRIVEN PROGRAM TO IMPLEMENT DICTIONARY OPERATIONS

Aim:

Write a menu driven program to do the following using a dictionary.


1. Display Contacts
2. Add Contact
3. Delete a Contact
4. Change a phone number
5. Search Contact
6. Exit

Coding:
d={}
while True:

print('''
1. Display Contacts
2. Add Contact
3. Delete a Contact
4. Change a phone number
5. Search Contact
6. Exit

''')
ch=int(input("Enter your choice:"))
if ch==1:

print("Saved Contacts")

for i in d:
print(' ')

print("Name:",i)

print("Phone.No:",d[i])

print(' ')
elif ch==2:
print("Add new contact")

name=input("Enter Name:")
27
ph=input("Enter Phone
n umber:")#d[name]=ph

d.setdefault(name,ph)

print("Contact Saved...")
elif ch==3:
print("Delete existing contact")

n=input("Enter name to delete contact:")


#d.pop(n)
#d.popitem()#del
d[n]
d.clear()
print("Contact Deleted...")

elif ch==4:
print("Change a phone number")
n=input("Enter name to change phone no.:")
new_ph=input("Enter new phone number:")
d[n]=new_ph
print("Contact Saved...")
elif ch==5:
print("Search Contact")
n=input("Enter name to search:")
if n in d:
print("Record Found...",d[n])
else:
print("Record not found...")
elif ch==6:
print("Quitting from App . ")
input("Press Enter to Exit..")
break

28
Output:

Result:-

The expected output has been achieved.

29
Ex.No:- 18 Date:-

PROGRAM TO CREATE REPORT USING A DICTIONARY

Aim:
Write a program to create a dictionary with the roll number, name and marks of n studentsin a
class and display the names of students who have scored marks above 75.

Coding:

d={1:['Rudra',99],2:['Rushi',98],3:['Prakash',65],4:['Jay',84]}

for i in d:

if d[i][1]>75:

print(d[i][0]," \tscored -", d[i][1])

Output:

Result:-

The expected result has been achieved.

30
Ex.No:- 19 Date:
CREATION OF DICTIONARY TO GENERATE SALES REPORT

Aim:

Write a program to create a dictionary and store salesman name as a key and sales of 3months as
values. Give the bonus to the salesman according to the given criteria:
• Total Sales < 1K – No Bonus
• Total Sales 1K to 2K – 5%
• Total Sales 2.1K to 3K – 8%
• Total Sales 3.1K to 4K – 10%
• Total Sales >4K – 12%

Coding:

d={'Rudra':[199,180,540],'Rushi':[543,876,453],'Preet':[650,987,123],'Jay':[284,456,321]}
bonus=0
for i in d:
d[i]=sum(d[i])
for i in d:
if d[i]<1000:
d[i]=0
elif d[i]>=1000 and d[i]<=2000:
d[i]=d[i]*0.05
elif d[i]>=2001 and d[i]<=3000:
d[i]=d[i]*0.08
elif d[i]>=3001 and d[i]<=4000:
d[i]=d[i]*0.1
elif d[i]>=4001:
d[i]=d[i]*0.12
print("Bonus for salesman:")
for i in d:
print(i,"\t: %.2f"%d[i])

Output:

Result:-

The expected result has been achieved.

31
Ex.No:- 20 Date:-

CREATION OF DICTIONARY TO ANALYSE THE DATA


Aim:

Write a program to enter a team name, wins and losses of a team. Store them into a dictionary
where teams names are key, wins and losses are values stored as a list. Do thefollowing based
on the dictionary created above:
• Find out the team’s winning percentage by their names
• Display the no. of games won by each team in a list
• Display the no. of games lost by each team in a list

Coding:

di ={}

l_win = []

l_rec = []
while True :
t_name = input ("Enter name of team (q for quit): ")

if t_name in 'Qq' :
print()
break

else :
win = int (input("Enter the no.of win match: "))

loss = int(input("Enter the no.of loss match: "))

di [ t_name ] = [ win , loss ]


l_win += [ win ]
if win > 0 :
l_rec += [ t_name ]
n = input ("Enter name of team for winning percentage: ")

wp=di[n][0] *100 / (di[n][0] + di[n][1] )


print ("Winning percentage:%.2f"%wp)
print("Winning list of all team = ",l_win)
print("Team who has winning records are ",l_rec)

32
Output:

Result:-

The expected result has been achieved.

33

You might also like