CS PRACTICAL FILE
CS PRACTICAL FILE
Class- XI(Science-NM)
Computer science
Practical File
INDEX
s.no program
.
1 Write a program to display Fibonacci
series up to a certain limit
2 Write a program to accept a
number ,find and display whether it is a
Armstrong number or not
3 Write a program to accept a number
and find out whether it is a perfect
number or not
4 Write a program to print the sum of
exponential series
5 WAP to print the pattern
6 WAP to accept a string and display
whether it is a palindrome
7 WAP to accept a string (a sentence) and
returns a string having first letter of
each word in capital letter.
8 WAP to display second largest element
of a given list.
9 WAP to display frequencies of all the
elements of a list.
10 WAP in Python to display those strings
which are string with ‘A’ of given list
11 WAP in Python to find and display the
sum of all the values which are ending
with 3 from a list.
12 WAP to count the word “to” and “the”
present in the file “poem.txt”
13 Write a recursive Program to search an
element in the list using binary search.
14 Write a program to generate random
numbers between 1 to 6 and check
whether a user won a lottery or not.
15 WAP to implement a stack using a list
data structure
16 WAP to check if a given number is
prime or not
17 WAP to count the number of vowels in a
string
18 WAP to check if given year is leap year
19 WAP for a Simple Calculator
20 WAP to find sum of first n natural
numbers
21 WAP to sort numbers in a list with
Bubble Sort
22 WAP to convert Celsius to Fahrenheit
23 WAP for a Voting Machine
24 WAP to find factorial of a number
25 WAP to find area different shapes
26 WAP to find volume of different objects
27 WAP for a Guessing game
28 WAP to make Pascal’s triangle
29 WAP for Rock paper scissors game
30 WAP to convert Decimal number into
Binary
ACKNOWLEDGEMENT
Program -2
Write a program to accept a number, find
and display whether it is a Armstrong
number or not
Code:
Output:
Program -3
Write a program to accept a number and
find out whether it is a perfect number or
not
Code:
Output:
Program -4
Write a program to print the sum of
exponential series
1+(x^1)/1! + (x^2)/2! +…….(x^n)/(n)!
Code:
Output:
Program -5
WAP to print the following pattern:
1
12
123
Code :
Output:
Program 6-
WAP to accept a string and display
whether it is a palindrome.
Code:
Output:
Program 7
WAP to accept a string (a sentence) and
returns a string having first letter of each
word in capital letter.
Code:
Output:
Program -8
WAP to display second largest element of
a given list.
Code:
Output:
Program -9
WAP to display frequencies of all the
elements of a list.
Code:
Output:
Program -10
WAP in Python to display those strings
which are string with ‘A’ of given list
Code:
Output:
Program -11
WAP in Python to find and display the
sum of all the values which are ending
with 3 from a list.
Code:
Output:
Program -12
WAP to count the word “to” and “the”
present in the file “poem.txt”
Code:
Output:
Program -13
Write a recursive Program to search an
element in the list using binary search.
Code:
Output:
Program-14
Write a program to generate random
numbers between 1 to 6 and check
whether a user won a lottery or not.
Code:
Output :
PROGRAM 15
WAP to implement a stack using a list
data structure
Code-
Program 16
WAP to check if a given number is prime
or not
Code:
Output:
Program 17
WAP to count the number of vowels in a
string
Code:
Output:
Program 18
WAP to check if given year is leap year
Code:
Output:
Program 19
WAP for a Simple Calculator
Code:
Output:
Program 20
WAP to find sum of first n natural
numbers
Code:
Output:
Program 21
WAP to sort numbers in a list with Bubble
Sort
Code:
Output:
Program 22
WAP to convert Celsius to Fahrenheit
Code:
Output:
Program 23
WAP for a Voting Machine
Code:
Output:
Program 24
WAP to find factorial of a number
Code:
Output:
Program 25
WAP to find area different shapes
Code:
Output:
Program 26
WAP to find volume of different objects
Code:
Output:
Program 27
WAP for a Guessing game
Code:
Output:
Program 28
WAP to make Pascal’s triangle
Code:
Output:
Program 29
WAP for Rock paper scissors game
Code:
Output:
Program 30
WAP to convert Decimal number into
Binary
Code:
Output: