PRACTICAL FILE (Class XI)
PRACTICAL FILE (Class XI)
CHILDREN ACADEMY ,
RAJ NAGAR EXTENSION, GZB
PRACTICAL FILE ON
3. WAP to input three numbers and display the largest / smallest number.
4. WAP to accept a number from the user and display whether it is an even number
or odd number.
5. WAP to accept percentage of a student and displays its grade accordingly.
8. WAP to accept a number, find and display whether it’s a Armstrong number or not.
9. WAP to reverse a number entered by the user & also to check whether the entered
number is palindrome of not.
10. WAP to input a number and check if the number is a prime or composite number.
11. WAP to compute the greatest common divisor and least common multiple of two
integers.
12. WAP to find the sum of the following series :
a) 1 + 1/1! + 1/2! + 1/3!+ …..
b) x- x2/2!+ x3/3!- x4/2!+ x5/5!- x6/6!
c) x + x2/2+ x3/3+ x4/4 +…. xn/n
13. Write a program to print the following patterns using nested loop:
a) * b) 1 c) 2 d) 12345 e) A
** 12 24 1234 AB
*** 123 246 123 ABC
**** 1234 2468 12 ABCD
1 ABCDE
14. WAP that reads a line & prints the following : (Use string functions)
1.Original String :
2.Reverse String :
3.Length of the String:
4.Count the number of characters in the string.
5. Count the number of words in the string.
6. Count the number of spaces in the string.
7. Count the number of alphabets in the string.
8. Count the number of digits in the string.
9. Count the number of uppercase letters.
10. Count the number of lowercase letters.
15. WAP that prompts the user for a string s & a character c, & outputs the string
produced from s by capitalizing each occurrences of the character c in s & making
all others characters lowercase. For example, if the user inputs “Mississippi” and “s” , the
program outputs “miSSiSSippi”.
16. WAP to print alternate characters in a string. input a string of your own choice.
17. WAP to enter the string. Extract all the digits from the string , if there are digits then
sum the collected digits together & display Original string, the digits, the sum of
the digits. If there are no digits then print “has no digits”.
19. Write a function called remove_duplicates that takes a list and returns a new list
with only the unique elements from the original. Hint: they don't have to be in the
same order.
20. WAP to input a list of numbers and find the smallest and largest number from the
list.
21. Create a list that contains the names of 5 students of your class.
(Do not ask for input to do so)
23. Write a Python program to input ‘n’ names and phone numbers to store it in a
dictionary and print the phone number of a particular name. ( using dictionaries)
24. Write a program to input ‘n’ employees’ salary and find minimum & maximum
salary among ‘n’ employees. (using tuples)
25. Write a program to input ‘n’ customers’ name and store it in tuple and display all
customers’ names on the output screen.
26. Write a program to input ‘n’ numbers and separate the tuple in the following manner.
Example
T=(10,20,30,40,50,60)
T1 =(10,30,50)
T2=(20,40,60)
28. Write a program that contains user-defined functions to calculate area, perimeter or
surface area, whichever is applicable, for various shapes like square, rectangle,
triangle, circle and cylinder.
The user-defined functions should accept values for calculation as parameters and
the calculated value should be returned. Import the module and use appropriate
functions.