Works Hee
Works Hee
Q1. Ask the user to enter a list containing numbers between 1 and 12. Then replace all of the entries in the
list that are divisible by 5 “##”
Q2. WAP in Python to find and display the sum of square of all the values which are ending with odd digits
from the following list:
Q3. WAP that searches for an entered number from the list of 10 numbers.
Q4. WAP that searches for prime numbers from a tuple of 20 elements.
Q5. Write a menu driven program to perform following tasks on a list as per the user’s choice.
a. Delete an existing element from its position
b. Sort the list in ascending order
c. Insert an element
d. Delete last element
e. Exit
Q6. Write a program to enter a string perform following tasks as per the user’s choice.
a. Number of characters
b. Number of words
c. Number of word “and” in the string
d. Number of letter “I” in the string
Q7. WAP to enter a string and print longest word.
Q8. WAP to enter a string and print word that is having more than 4 characters and starts with letter ‘p’
Q9. WAP to enter a string and print reverse.
Q10. Write a program (menu driven) to input n numbers from the user, store these numbers in a tuple and
print perform following tasks as per the user’s choice.
a. No. of elements
b. Reverse elements
c. Minimum element
d. Maximum element
e. mean
f. Exit
Q11. Write a program to store students' names and their percentage in a dictionary, and delete a particular
student name from the dictionary. Also display dictionary after deletion.
Q12. Write a menu driven program to input your 50 friend’s name and their hobby and store
them in the dictionary as key-value pair. Perform the following operation on the dictionary
according to the user’s choice.
1. Display the name and hobby of all your friends
2. Modify the hobby of an existing friend
3. Check friend name is present in the dictionary or not
Q13. Write a program to store n book names and their price in a dictionary, and display price of a particular
book name.
Q14. Write a program to store students' names and their percentage in a dictionary, and delete a particular
student name from the dictionary. Also display dictionary after deletion.
Q15. WAP to find total number of letter ‘E’, ‘e’, ‘N’ and ‘n’ from the following given quote: