Batch I
0. Sorting : bubble sort and insertion sort and selection sort and linear search. and binary search.
1. Write Ducktyping, Operator Overloading, Method Overloading & Method Overriding
3. Write a Python program that matches a string that has an 'a' followed by : A) zero or more b's. B) one or more b's. C) zero or one 'b' D) three 'b'. E) two to three 'b'.
5. Write a Python program to check that a string contains only a certain set of characters : (in this case a-z, A-Z and 0-9).
5. Write a Python program that matches a string that starts with a specific number.
6. Write a program that accepts a string from the user and writes it to a text file. Thereafter, the same program reads the text file and displays it on the screen.
7. Write python GUI code using tkinter to demonstrate use of place layout manager. (make use of label, entry and button widget)
8. Write a Python program to demonstrate use of try/except/else and finally in exception handling
12. Write python code to demonstrate the use of : A. Anonymous function lambda B. Mapping functions over Sequences C. Functional programing using filter D. Functional programing using reduce
16. Write a program to create a module, use it in other program by renaming it. Demonstrate different ways to use a module in your program.
BATCH II
1. Write a Python program to demonstrate single, multilevel and multiple Inheritance
4. Write a Python program to find sequences of lowercase letters joined by an underscore.
5. Write a Python program to check for a number at the end of a string.
B) that opens a file and handles a FileNotFoundError exception if the file does not exist.
17. Write a Python program to square and cube every number in a given list of integers using Lambda.
BATCH III
4. Write a Python program to find the sequences of one upper case letter followed by lower case letters.
9. Write Python program:
A) that prompts the user to input an integer and raises ValueError exception if the input is not a valid integer.
B) to handle a ZeroDivisionError exception when dividing a number by zero.
A) Accessing elements B) Concatenation C) Repetition D) Membership E) Slicing
14. Write a program with a user defined function with string as a parameter which replaces all vowels in the string with '*'.
15. Write a function to convert a number entered by the user into its corresponding number in words. For example, if the input is 876 then the output should be ‘Eight
Seven Six’. (Hint: Use Dictionary)
17. Write a Python program to create a lambda function that adds 15 to a given number passed in as an argument, also create a lambda function that multiplies argument x with argument y and prints the result
BATCH IV
2. Write a Python program to demonstrate Inner class and Outer class
4. Write a Python program that matches a string that has an 'a' followed by anything ending in 'b'.
8. Write a Python program to demonstrate how to catch multiple specific exceptions
a) Display the name and phone number of all your friends
b) Add a new key-value pair in this dictionary and display the modified dictionary
c) Delete a particular friend from the dictionary
d) Modify the phone number of an existing friend
e) Check if a friend is present in the dictionary or not
f) Display the dictionary in sorted order of names
BATCH V
4. Write a Python program that matches a word at the beginning of a string.
5. Write a Python program that matches a word containing 'z', not the start or end of the word.
13. Demonstrate the following with respect to a dictionary:
Additional Programs
A. reverse a string using slicing.
B. find sequences of lowercase letters joined by an underscore.
Thereafter, the same program should read the text file and display it on the screen.
No comments:
Post a Comment