0% found this document useful (0 votes)
9 views

Practicals

Uploaded by

Jannah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Practicals

Uploaded by

Jannah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Delhi Public School Bangalore East

Subject: Computer Science (083) Practical List


Grade XI (2024-25)

1. Write a program to compute simple interest and compound interest given principle,
rate and time period.
2. Write a program to convert temperature in Celsius to Fahrenheit & vice versa.
3. Write a program to find the largest of three numbers.
4. Write a program to find whether the year is a leap year or not.
5. Write a program to find the area of a triangle using Heron’s formula.
6. Write a program to generate 6 random numbers between 100 and 999 and then print their
mean, median and mode.
7. Write a program to find the roots of the quadratic equation.
8. Write a program to perform all [+,-,*,/,%,**] the mathematical operations on a set
of values.
9. Write a program to input 3 sides of a triangle and prints whether it is an equilateral,
isosceles or scale triangle.
10. Write a program to a digit and print it in words.
11. Write a program to show if the entered character is uppercase or lowercase.
12. WAP to generate the Electric Bill charges according to charges. Following are the fares:First
100 Units : 1 Rs per day.
Next 200 Units : 2 Rs per day.
Above 300 Units : 4 Rs per day.

13. Write a program to accept the cost price of a bike and display the road tax to be paidaccording to the
following criteria:

14. Write a program to find the factorial of a number.


15. Write a program to find if a given number is prime or not.
16. Write a program to generate the Fibonacci series till first ‘n’ numbers.
17. Write a program to find a reverse of the four-digit number.
18. Write a program to check if the given string is a palindrome or not.
19. Write a program to check whether a number is an Armstrong number.
20. Write a program to input a string and a character and count the number of occurrences
of the input character in a given string.
21. Write a program to count number of vowels in a given sentence.
22. Write a program to print first n odd numbers in descending order.
23. Write a program that should prompt the user to type some sentences. It should then print
number of words, number of characters, number of digits and number of special
characters in it.
24. Write a program to find the sum of the gi ven series.
a. 1+2+3+…….+n
b. 12+22+32+…..+n2
c. x – x2 /2! + x3 /3! – x4 /4! + x5 /5! – x6 /6! (Input x)
d. 1+ x2 + x3 + x4 + x5 +… .......................... xn
25. Write a program to print the following pattern:

a) * b) * c) 54321
** 5432
** ** * 543
*** ***
** 54
**** 5
*

26. Ask the user to enter a list of strings. Create a new list that contains only those strings
which start with a vowel.
27. Write a program to create a nested tuple to store marks of three subjects for five students.
Compute the total marks and average obtained by each student.
28. Write a program to read a list of ‘n’ integers from the user. Create two new lists, one having
all positive numbers and the other having all negative numbers. Print all threelists.
29. Given a tuple pairs = {(2,5),(4,2),(9,8),(12,10)} , count the number of pairs (a,b) such that
both a and b are even.
30. Write a program to perform various list operations using menu driven operations.
a. Add element c.Delete element e. Display list
b. Modify element d. Add another list f. Exit
31. Write a program to accept age of employees & count the number of employees in the following
age groups.
a. 26-35 b. 36-45 c. 46-55
32. Create a dictionary whose keys are month names and whose values are number of days in the
corresponding months. Perform the following:
• Ask the user to enter a month name, and use dictionary to tell how many days are in the
month.
• Print out all of the months with 31 days.
• Print out all of the keys in alphabetical order.
33. Write a program to repeatedly ask user to enter a team name and now many games the
team has won or last.
a) Using dictionary, allow the user to enter team name and print out the team’swin
percentage.
b)Using it to create a list whose entries are the number of runs of each team.
c) Using dictionary create a list of all teams having winning records.
***********************************************

Sample Journal Program


Date / 2. ' 0 6-},o2,3

f~~U'IO.'V t : G·~·
__,
P,g,N~ I J
1npu.J:' I f' > y OJ\d
't cu p'l'i'tlt..Jp~,N.Jt
'~ i·......_ ~"n'o,),

.n,Jt

C.Je,v..le>Jt.
s:-: { p*.,iJJ/100
a.~ r"D+Crlroo)l*e
Ci~ (). - L

' ".1. " I


_,., ~,™ ~''
O.k-J> c,

Swp

~v.t_:
r.nter pnnciple: UbUU
Enter rate: 10 ! ;,

Enter the time period: 2


The sillple interest is: 2520.0 and the cmrpoll!ld illtm/46.000000000002

Teachcr\filgnatwe _ _ _ _ _ _ __
\.

..i

You might also like