0% found this document useful (0 votes)
0 views4 pages

Class 11 Record Questions-2024-25 Python

The document outlines a list of practical programming exercises for Class XI Computer Science using Python. It includes tasks such as calculating interest, determining leap years, computing areas of various shapes, and manipulating strings and lists. Each exercise is designed to enhance programming skills through practical application of concepts.

Uploaded by

nathanpjosh2008
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)
0 views4 pages

Class 11 Record Questions-2024-25 Python

The document outlines a list of practical programming exercises for Class XI Computer Science using Python. It includes tasks such as calculating interest, determining leap years, computing areas of various shapes, and manipulating strings and lists. Each exercise is designed to enhance programming skills through practical application of concepts.

Uploaded by

nathanpjosh2008
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/ 4

PRACTICAL FILE- COMPUTER SCIENCE (083)

LIST OF PRACTICALS

CLASS-XI Programming Language : Python


S.No. NAME OF PRACTICAL
1 Write a menu driven program to compute and display simple interest and compound
interest.
[ Simple Interest =(principle* rate*time)/100
Compound interest=(principle* (1+rate/100)time]- principle
2 Write a program to check whether the year entered is a leap year or not.

3 Write a menu driven program to calculate and display


1. Area of a Rectangle
2. Area of a Equilateral triangle (√3 a2/4 )
3.Area of a Scalene triangle (√s(s - a)(s - b(s – c) , s=(a+b+c) /2
where a,b & c are three sides of a triangle
4.Exit
4 Write a program for calculating the total amount to be paid by a client for hiring cab for
his business trip. Service tax of 9% of total amount payable.
Per day charges for cab is as follows:

Category of car Category Code Amount in Rs


Deluxe car D 1000 per day
Semi Deluxe Car S 800 per day
Ordinary Car O 700 per day

The program should accept the no of days and the category code and compute and display
the total amount, tax and net amount.

5 An electronics shopping store has announced the following seasonal discounts on purchase
of certain items.

Purchase Amount Discount on Laptop Discount on Desktop


PC
Up to ₹ 25000 0.0% 5.0%
₹ 25000 to ₹ 50000 5.0% 7.5%
₹ 50001 to ₹ 1,00,000 7.5% 10.0%
More than ₹ 1,00,000 10.0% 15.0%

Write a python code to input name, amount of purchase and the type of purchase (‘L’ for
Laptop and ‘D’ for Desktop) by a customer. Compute and print the net amount to be paid
by a customer along with his/her name.
6 Write a menu driven program to
• Compute and display the sum of first n natural numbers
• Compute and display the factorial of a number
• Exit
The menu is continuously displayed until the user selects the exit option.
7 Write a menu driven program to read a number and do the following:
• Find sum of the digits
• Reverse the number
• Check if the number is palindrome
Keep allowing the user to make choices until they select exit/quit .

8 Write a menu driven program to read a number and do the following:


• Find divisors of a given number
• Check whether it is a perfect number or not
The menu is continuously displayed until the user selects the exit option.
9 Write a program to find the sum of the series as given below:

• S= 1 + x/x2 + 2x/x3+ 3x/x4 +………………….. + nx/xn+1

• S= 1/x - 3!/x2 + 5!/x3 - 7!/x4 + 9!/x5 - ----------- (2n-1)!/xn

101. Write a program to


1. To check whether a given number is prime
2. To check whether a given number is Armstrong number

2. Strings
113. Write a menu driven program to accept a string from the user at run time and perform
the following operations using String methods based on the user’s choice .
1. Display the number of vowels(upper case and lower case),
consonants(upper case and lower case), digits, spaces and special characters
2. Display the String length along with the String in toggled case (Sentence case,
Title Case, Uppercase or Lowercase)
3. Display the number of words in the string, assuming that two words are
separated by a single space

12 4. Write a menu driven program to accept a string from the user at run time and perform
the following operations based on the user’s choice .
1. Check whether the string entered is a palindrome or not (with out using string
Modules).
2. Find if a substring is present in the input String. If it is present, display the
first index and its total count. Else, display an appropriate message
13 5. Write a program to accept the name and phone number of the user. Name should
contain only alphabets or spaces. Phone number should be entered in 10 digits . Display
the name in title case and Phone number with 2 dashes, a dash each after 3rd and 6th
digit. Eg:- 017-555-1212. Display an error message if the name / phone number is not
valid.

6. Lists
14 7. Write a menu driven program to perform the following operations on list initialized
at run time :
1. To compute & display the factorial of all the elements in the list .
2. To compute & display the sum of all the odd numbers in the list .

15 8. Write a menu driven program to perform the following . Use library functions.
Add 5 elements to a list containing names of fruits at runtime &display list
1. Sort the list and display the list before and after the sort
2. Insert a fruit at the desired location & display list
3. 3. Check if a given fruit is present in a list , if present display its position else display
"fruit not found" (Linear search)

16 9. Write a program to :
• To find the largest ,smallest and third largest number in a list.
• To print multiplication table of a number based on user’s choice .
• To compute and display the sum of all even numbers from a list of numbers
given at run time

10. Tuples
17 Write a program to assign 10 integers into a tuple . The program should check
whether
1. An element (n) in the tuple is odd or even . If n is odd, display 3n + 1. If n is
even, display n/2.
2. Each element in the tuple is equal to the sum of the cubes of its digits. Find the
smallest and largest such numbers in the given tuple .

18 11. Write a program to assign 10 elements(integers and strings) into a tuple . The
program should check whether
1. An element (n) is an prime integer. Display all the prime numbers and its count.
2. An element in the tuple is string and display all the strings which consisted of
at least one vowel in it.
Dictionary
19 12. Write a menu driven program using dictionary
( Key = Customer Name, Value = Phone number ) to do the following:
1. Add Customer
2. Display Customer & Phone No:
3. Search Customer (Query)
4. Update Customer’s Phone No:
5. Exit
Notes:
1. Add 5 customer details
2. Display the details in the following format :
Customer Name Phone Number
Rohan 4567229012
Amit 9865422234
xxxxxx 5678299291
xxxxxx 2384875775

3. Search on Customer name to return the Phone number


4. Accept the Customer name whose Phone number has to be updated . If it exists
change the Phone number otherwise display NOT FOUND

13. Write a menu driven program


20
1. To count the frequency of elements in a list using a dictionary.
2. To input a number and display the corresponding number names

Example for 1.
Input : my_list =[1, 1, 1, 5, 5, 3, 1, 3, 3, 1, 4, 4, 4, 2, 2, 2, 2]
Output :
{1: 5, 5: 2, 3: 3, 4: 3, 2: 4}

Example for 2.
Input : Enter the number:209
Output :
Two Zero Nine

You might also like