Introduction
  • Course Overview
Variables
  • how is char, integer, float and a string variable created and printed in python
  • How a user function is defined in python ?
Tuples
  • create a tuple with values belonging to single datatype and print the values.
  • create a tuple with values belonging to mixed datatype and print the values
  • create a tuple which contains the following:
  • Explain the concept of tuple packing and tuple unpacking
  • define a tuple which contains a string value. when queried, the tuple should be
  • my_tuple = ('p','z','r','q','i','t'), if we print my_tuple[6], does it print '0'
  • my_tuple = ('a', 'l', 'g', 'o', 'r', 'i', 't', 'm') use slicing and print l g o
  • can we convert tuples to list and vice versa ?
  • write a pgm to check whether a given element is present in the tuple
  • can we convert tuples to list, from list to tuples and back to list from tuples
  • using print statement do the following:
Lists
  • Write a pgm to print a new list which contains all the 1st chars in the i/p list
  • write a program to replace each string with an integer value in the given list
  • Explain the logic of the solution which prints all duplicated values in a list
  • write the program which prints all duplicated values in a list
  • print True if the first element or last element is divisible by 4 in the list
  • print True if the first and last elements are equal and odd numbers in the list
  • print True if the sum of the first and last elements  are equal in the two lists
  • Write a program to print the sum of all the elements in the given list
  • Write a program to print a new list by doing a left rotate on the given list
  • Write a program to find the maximum number from the given list of numbers
  • Given two lists x and y, print two new lists as output which includes
  • Write a program which prints all elements which are multiples of 4
Shallow Copying And Deep Copying
  • Given a list   colours1 = ["red", "green"] with the help of a new list, modify
  • Given a list list1 = ['a','b','c','d‘] with the help of 'slice' construct modify
  • Given a list, lst1 = ['a','b',['ab','ba']]  with the help of 'slice' construct a
  • Given a list    lst1 = ['a','b',['ab','ba']]  Use the function ‘deepcopy’ and
  • Given a list    lst1 = ['a','b',['ab','ba']]  Use the function ‘copy’ and
__str__ method
  • write a program to convert a integer to string
__repr__ method
  • Write a pgm to compare two string using - str() and eval() functions
Strings
  • Write a program to print a new string which contains 4 copies of the last three
  • Write a program to print the output string which contains last half + first half
  • Given a string, print the output string by removing the first and last character
  • program to count the number of occurrences of each character in a given string
  • Write a program to convert all the vowels to uppercase for the given input str
  • Write a program to reverse the given input list
  • Write a program to count number of occurrences of vowels in a given string
  • Write a program to print the longest length string from given input list of str
Numbers
  • Write a program to find if a given number is prime or not
  • Write a program to find the factorial of a given number
  • Write a program to construct two dimensional array and print the same
File Operations
  • Create a directory with name “newdir” and create a file “tempo” in the new dir
  • Rename  a file in a particular director Take the backup before renaming
  • List all the files from a given path and verify the file test.txt file exists ?
  • Write a program to retrieve the words XYZ and ABC from a given file
  • Write a program to get some keywords from a file.
  • Get the current working directory and navigate to all the directories
  • Remove all the empty directories from a given path
  • Get  file size, inode, owner of a each file in a given path
  • Get the file permissions of all files in a given path and change all the file ..
  • Execute standard Linux commands using python programming
  • Create a helloworld. py file and run this program by invoking in other py file
  • Create a helloworld. py, run this program in one terminal and ...
  • Redirect the output of the file
  • Write a more optimized program to display the contents in the text file
  • Get system free, used , total memory
  • Write a program to reverse the contents of the file
__name__ parameter
  • create two modules one. py and two. py. Define a function in one. py and ....
Regular Expressions
  • Given a string containing months, dates and years, Write a regular expression to
  • Given a string containing months, dates and years, Write a regular expression to
  • Given a string containing names and age of a list of people, Write a regular exp
  • Given a string containing months, dates and years, Write a regular expression to
  • Use the ‘re’ regular expression compilation feature and replace 'Hello Sir' with
  • Write a regular expression to match email address and ip address
  • Using Regular Expressions. Of the below statement:      "girls are prettier than
  • Given a string   str="hello worldello ello"  Replace the substring 'ello' with
Json Operations
  • Get all the count values from the file ‘comments.xml’ and print the ...
  • Get only university names from the file ‘gjson.json’
  • From the file comments.json, read all the data display the info based on ...
Html Table Creation
  • Create a HTML table using python. Add the below section headers  in a row ...
Classes
  • Create a class with a class variable and a member function.   Print the value of
  • Create a class with a class variable and a member function.   Create a object of
  • Explain the difference between Class and Instance Variables
  • How we can declare constructor and destructor in python
  • Explain the instance method
  • Write an external function out of the class which will give us the count of the
  • Write an external function out of the class which will use the object of the
  • Define a member function of the class which when called will always take class a
  • Explain the application of a static method
  • What is the output of the pgm:
  • What is the output of the pgm:
  • What is the output of the pgm: