COMPUTER SCIENCE
PRACTICAL FILE
Name : Prakhar Saxena
Class : XI-S1
Roll no:
Submitted To: Ms. Sandhya Singh
GURUKULTHESCHOOL Page 1
CERTIFICATE
This is to certify that Prakhar Saxena of class XI S1 ,
Roll No __________________ has completed CS Practical File under my supervision and guidance
as per the latest curriculum of Central Board of Secondary Education (2020-2021).
_________________ Institution Rubber Stamp
Teacher In-charge
Date:_______________
GURUKULTHESCHOOL Page 2
ACKNOWLEDGEMENT
In the accomplishment of this practical file successfully, many people have best owned upon me
their blessings and the heart pledged support, this time I am utilizing to thank all the people who
have been concerned with this practical file. Primarily I would thank God for being able to
complete this project with success. Then I would like to thank my Principal Mr. Gaurav Bedi and
Computer Science teacher Ms. Sandhya Singh, whose valuable guidance has been the ones that
helped me prepare this file and make it a success. Their suggestions and instructions have served as
the major contributor towards the completion of the file. Then I would like to thank my parents and
friends who have helped me with their valuable suggestions and guidance has been very helpful in
various phases. Last but not the least I would like to thank my classmates who have helped me a
lot.
Name: Prakhar Saxena
Roll no: ____________________________
GURUKULTHESCHOOL Page 3
TERM-1
GURUKULTHESCHOOL Page 4
INDEX
[Link] TOPIC
1 Write a program to show entered string is a palindrome or not.
Write a program to show statistics of characters in the given line(to counts the number of
2
alphabets ,digits, uppercase, lowercase, spaces and other characters).
3 WAP to remove all odd numbers from the given list.
Write a program to display frequencies of all the element of a list.
4
5 Write a program to display those string which are starting with ‘A’ from the given list.
Write a program to find and display the sum of all the values which are ending with 3
6
from a list.
7 Write a program to swap the content with next value, if it is divisible by 7 in a list.
8 Write a program to accept values from a user and create a tuple.
Write a program to input total number of sections and stream name in 11th class and
9
display all information on the output screen.
10 Write a program to find factorial of entered number.
11 Write a program to call func() to find greater out of entered two numbers.
12 Write a program to show all non -prime numbers in the entered range .
13 Write a program to show GCD of two positive numbers .
14 Write a program to insert item on selected position in list and print the updated list.
15 Write a program to insert item on selected position in list and print the updated list.
Write a program to read a string and print it after replacing each of its capital alphabets
16 by the corresponding small alphabet and each small alphabet by its corresponding capital
alphabet.
17
18
19
20
GURUKULTHESCHOOL Page 5
GURUKULTHESCHOOL Page 6
PRACTICAL 1
Practical - Write a program to show entered string is a palindrome or not.
Code-
GURUKULTHESCHOOL Page 7
Output-
PRACTICAL 2
Practical - Write a program to show statistics of characters in the given line(to counts the
number of alphabets ,digits, uppercase, lowercase, spaces and other characters).
Code-
Output-
GURUKULTHESCHOOL Page 8
PRACTICAL 3
Practical- Write a program to remove all odd numbers from the given list.
Code-
Output-
GURUKULTHESCHOOL Page 9
PRACTICAL 4
Practical- Write a program to display frequencies of all the element of a list.
Code-
GURUKULTHESCHOOL Page 10
Output-
PRACTICAL 5
Practical- Write a program to display those string which are starting with ‘A’ from the given list.
Code-
GURUKULTHESCHOOL Page 11
Output-
PRACTICAL 6
Practical- Write a program to find and display the sum of all the values which are ending with 3
from a list.
Code-
GURUKULTHESCHOOL Page 12
Output:
PRACTICAL 7
GURUKULTHESCHOOL Page 13
Practical- Write a program to swap the content with next value, if it is divisible by 7 in a list.
Code-
Output-
GURUKULTHESCHOOL Page 14
PRACTICAL 8
Practical- Write a program to accept values from a user and create a tuple.
Code-
Output-
GURUKULTHESCHOOL Page 15
PRACTICAL 9
Practical- Write a program to input total number of sections and stream name in 11th class and
display all information on the output screen.
Code-
Output-
GURUKULTHESCHOOL Page 16
PRACTICAL 10
Practical- Write a program to find factorial of entered number.
Code-
GURUKULTHESCHOOL Page 17
Output-
PRACTICAL 11
Practical- Write a program to call func() to find greater out of entered two numbers.
Code-
Output-
GURUKULTHESCHOOL Page 18
PRACTICAL 12
Practical- Write a program to show all non -prime numbers in the entered range .
Code-
Output-
GURUKULTHESCHOOL Page 19
PRACTICAL 13
Practical- Write a program to show GCD of two positive numbers.
Code-
Output-
GURUKULTHESCHOOL Page 20
PRACTICAL 14
Practical- Write a program to insert item on selected position in list and print the
updated list.
Code-
Output-
GURUKULTHESCHOOL Page 21
PRACTICAL 15
Practical- Write a program to insert item on selected position in list and print the
updated list.
Code-
Output-
GURUKULTHESCHOOL Page 22
PRACTICAL 16
Practical- Write a program to read a string and print it after replacing each of its
capital alphabets by the corresponding small alphabet and each small alphabet by its
corresponding capital alphabet.
Code-
GURUKULTHESCHOOL Page 23
Output-
GURUKULTHESCHOOL Page 24
TERM-2
GURUKULTHESCHOOL Page 25
INDEX
[Link]. TOPICS
1 Write a program that find an elements index/position in a tuple Without using index().
2 Write a program that checks for presence of a value inside a dictionary and prints its
keys with ignore case.
3 Write a menu driven program to calculate: Area of circle [A=2] Area of square [A=a* a]
Area of rectangle [A=1*b]
4 Write a program to create a dictionary named year whose keys are month names and
values are their corresponding number of days.
5 Write a program that repeatedly asks the user to enter product names and prices.
Store all of them in a dictionary whose keys are product names and values are prices.
Also write a code to search an item from the dictionarv.
6 Write a program to create a tuple storing first 9 terms of Fibonnaci Series.
7 Write a program as per following specifications:
(i)Return the length of the shortest string in the tuple of a strings.
(ii)Precondition: the tuple contains atleast one element.
8 Write a function check(key) which takes a key as an argument and check whether that
key is present in dictionary or not.
9 Write a program to Accept the number of terms say n from the user and display the
dictionary in the form of {n: n*5}
For example: If number of terms entered by user is 4 then the expected dictionary is
{1:5,2:10,3:15,4:20}
10 Write a program to display the maximum and minimum value in dictionary.
GURUKULTHESCHOOL Page 26
PRACTICAL 1
Practical- Write a program that nd an elements index/posi on in a tuple without using index().
Code-
Output-
GURUKULTHESCHOOL Page 27
fi
ti
PRACTICAL 2
Practical- Write a program that checks for presence of a value inside a dic onary and prints its keys
with ignore case.
Code-
Output-
GURUKULTHESCHOOL Page 28
ti
PRACTICAL 3
Practical- Write a menu driven program to calculate: Area of circle [A=2] Area of square [A=a* a].Area
of rectangle [A=1*b]
Code-
Output-
GURUKULTHESCHOOL Page 29
PRACTICAL 4
Practical- Write a program to create a dic onary named year whose keys are month names and values
are their corresponding number of days.
Code-
Output-
GURUKULTHESCHOOL Page 30
ti
PRACTICAL 5
Practical- Write a program that repeatedly asks the user to enter product names and prices. Store all of
them in a dic onary whose keys are product names and values are prices. Also write a code to search an
item from the dic onarv.
Code-
Output-
GURUKULTHESCHOOL Page 31
ti
ti
PRACTICAL 6
Practical- Write a program to create a tuple storing rst 9 terms of Fibonnaci Series.
Code-
Output-
GURUKULTHESCHOOL Page 32
fi
PRACTICAL 7
Practical- Write a program as per following speci ca ons:
(i)Return the length of the shortest string in the tuple of a strings.
(ii)Precondi on: the tuple contains atleast one element.
Code-
Output-
GURUKULTHESCHOOL Page 33
ti
fi
ti
PRACTICAL 8
Practical- Write a func on check(key) which takes a key as an argument and check whether that key is
present in dic onary or not.
Code-
Output-
GURUKULTHESCHOOL Page 34
ti
ti
PRACTICAL 9
Practical- Write a program to Accept the number of terms say n from the user and display the
dic onary in the form of {n: n*5}
For example: If number of terms entered by user is 4 then the expected dic onary is
{1:5,2:10,3:15,4:20}
Code-
Output-
GURUKULTHESCHOOL Page 35
ti
ti
PRACTICAL 10
Practical- Write a program to display the maximum and minimum value in dic onary.
Code-
Output-
GURUKULTHESCHOOL Page 36
ti