0% found this document useful (0 votes)
18 views16 pages

Programs (CS) 20

The document contains instructions for 13 programming problems or exercises including writing programs to calculate simple interest, check if a year is a leap year, grade a student based on marks, find the largest and smallest of three numbers, generate patterns using loops, calculate a series sum, check if a number is an Armstrong number, print the Fibonacci series, count characters in a string, check if a string is a palindrome, replace words in a sentence, replace vowels in a string, and join parts of two strings to form a third string.

Uploaded by

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

Programs (CS) 20

The document contains instructions for 13 programming problems or exercises including writing programs to calculate simple interest, check if a year is a leap year, grade a student based on marks, find the largest and smallest of three numbers, generate patterns using loops, calculate a series sum, check if a number is an Armstrong number, print the Fibonacci series, count characters in a string, check if a string is a palindrome, replace words in a sentence, replace vowels in a string, and join parts of two strings to form a third string.

Uploaded by

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

1.Write a program for calculating simple interest.

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

You might also like