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

PRACTICAL FILE (Class XI)

Uploaded by

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

PRACTICAL FILE (Class XI)

Uploaded by

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

A. K.

CHILDREN ACADEMY ,
RAJ NAGAR EXTENSION, GZB

PRACTICAL FILE ON

COMPUTER SCIENCE (083)


SESSION: 2023-24

TOPIC COVERED : Python Programs

SUBMITTED TO: SUBMITTED BY:

MS. ACHLA AGARWAL YOUR NAME


PGT(COMP.SCI) CLASS & SECTION
ROLL NO.-
CONTENTS / INDEX

S. No. Programs T.Sign


1. WAP to compute x n of given two integers x and n.

2. WAP to calculate Simple Interest.

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.

6. WAP to print Fibonacci Series up to certain limit.

7. WAP to display prime numbers up to a certain limit.

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”.

18. WAP to check whether the given string is a palindrome or not.

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)

(i) Print the list


(ii) Ask the user to input one name and append it to the list
(iii) Print the list
(iv) Ask user to input a number. Print the name that has the number as index
(Generate error message if the number provided is more than last index value).
(v) Add “Kamal” and “Sanjana” at the beginning of the list by using "+".
(vi) Print the list
(vii) Ask the user to type a name. Check whether that name is in the list.
If exist, delete the name, otherwise append it at the end of the list.
(viii) Create a copy of the list in reverse order
(ix) Print the original list and the reversed list.
(x) Remove the last element of the list.
22. Write a code to create customer’s list with their number & name and delete any
particular customer using his /her number.( using dictionaries)

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)

27. Write a Python program to generate a random number between 0 to 9.

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.

You might also like