The document outlines various topics to demonstrate in Python including operators, decision making and loops, string functions, file operations, list, tuple, set and dictionary operations, functions, sorting, object oriented programming, NumPy and Matplotlib libraries. It provides examples for different operations on common data structures and visualization libraries.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
11 views5 pages
Py QB Internal Final
The document outlines various topics to demonstrate in Python including operators, decision making and loops, string functions, file operations, list, tuple, set and dictionary operations, functions, sorting, object oriented programming, NumPy and Matplotlib libraries. It provides examples for different operations on common data structures and visualization libraries.
5 - Demonstrate creation and different operations on List data
structure in python i) Reverse a list in Python ii) Concatenate two lists index-wise iii) Turn every item of a list into its square iv) Iterate both lists simultaneously (list1 in original order and items from list2 in reverse order.) v) Remove empty strings from the list of strings vi) Write a program to extend it by adding the sublist ["h", "i", "j"] in such a way that it will look like the following list.
6 - Demonstrate creation and different operations on Tuple data
structure in python. i) Reverse the tuple ii) Access value 20 from the tuple iii) Write a program to unpack the following tuple into four variables and display each variable iv) Swap two tuples in Python v) Write a program to copy elements 44 and 55 from the following tuple into a new tuple vi) Sort a tuple of tuples by 2nd item
7 - Demonstrate creation and different operations on Set data
structure in python i) Add a list of elements to a set ii) Return a new set of identical items from two set iii) Update the first set with items that don’t exist in the second set iv) Check if two sets have any elements in common. If yes, display the common elements v) Update set1 by adding items from set2, except common items vi) Remove items from set1 that are not common to both set1 and set2 8 - Demonstrate creation and different operations on Dictionary data structure in python i) Convert two lists into a dictionary ii) Merge two Python dictionaries into one iii) Initialize dictionary with default values iv) Create a dictionary by extracting the keys from a given dictionary v) Delete a list of keys from a dictionary vi) Change value of a key in a nested dictionary
9 - Demonstrate creation and use of Functions in python with
all kinds of “parameters” used with functions
10 - Demonstrate different sorting operations in python and
complex time difference
11 - Demonstrate creating objects and inheritance.