Programs (CS) 20
Programs (CS) 20
LANCER’S CONVENT
SCHOOL
ROHINI, PRASHANT VIHAR, DELHI-110085
COMPUTER SCIENCE
PRACTICAL FILE
(2022-2023)
SUBMITTED BY-
YOUR NAME HERE -ABHINAV AGGARWAL
CLASSS -11-B
ADMNO -12565
2.Write a program to check whether a year is leap year or not and print
proper message.
3.A school has following rules for grading system: a. Below 25 - F b. 25 to 45 - E c. 45
to 50 - D d. 50 to 60 - C e. 60 to 80 - B f. Above 80 - A Ask user to enter marks and
print the corresponding grade.
3
4
4.input three numbers and display the largest / smallest number
5.Generate the following pattern using nested loop.
6
5.Generate the following pattern using nested loop.
7
5.Generate the following pattern using nested loop.
8
6.write a program to input the value of x and n and print the sum of the
following series:
x+x^2+x^3+...+x^n
9
7.Determine whether a number is a Armstrong or not
10
8.Display the n terms of a Fibonacci series.
11
9.Count and display the numbers of vowels, consonants, spaces,
uppercase, lowercase characters in string
12
10.input a string and check it is palindrome or not.
13
11.Take a sentence as an input where each word in the sentence is
separated by a space. Replace each bank with a hyphen and print the
modified sentence.
14
12.Write a program to replace the vowels with in the string ‘program to
replace vowels in a string.
15
13.Write a program to join starting 5 letters and ending 3 letters of
string1 with string 3 letters and ending 5 letters of string2 o form a
string3.
16