Class 11 Record Questions-2024-25 Python
Class 11 Record Questions-2024-25 Python
LIST OF PRACTICALS
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.
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 .
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
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