python programming list1
python programming list1
12
123
1234
2)Write a program to create class EMPLOYEE with ID and NAME and display
its contents.
4) Explain decision making statements If- else, if- elif- else with example.
iii) >>> t1 = [ 3, 5, 6, 7]
>>> print (t 1 [2])
>>> print (t 1 [–1])
>>> print (t 1 [2 :])
>>> print (t 1 [:])
6) Write a program for package Numpy with example.(Matrix
Addition,subtraction)
9) Write a program to open a file in write mode and append some contents at
the end of file.
1)>>>indices[:4]
2)>>>indices[:-2]
12)Write a python program to input any two tuples and interchange the tuple
variables.
17) Write a Python program to calculate sum of digit of given number using
function.
18) Write a Python Program to accept values from user in a list and find the
largest number and smallest number in a list
19)Design a class student with data members : name, roll no., department,
mobile no. Create suitable methods for reading and printing student
information.
2
4 6 8
10 12 14 16 18
22)Write python program using module, show how to write and use module
by importing it.
23) Write a Python program to create user defined exception that will check
whether the password is correct or not.
24)Write a program for overloading and overriding in python.
25)WAP to read contents of first.txt file and write same content in second.txt
file.
26)Write a program for seek ( ) and tell ( ) function for file pointer
manipulation in python .
27)Write a program to create class student with Roll no. and Name and
display its contents.
34)Design a class student with data members; Name, roll number address
Create suitable method for reading and printing students details.
35)Create a parent class named Animals and a child class Herbivorous which
will extend the class Animal. In the child class Herbivorous over side the
method feed ( ). Create a object.
36)Print the following pattern using loop:
1010101
10101
101
1
39) Write a python program that takes a number and checks whether it is a
palindrome.
40) Write a python program to create a user defined module that will ask
your program name and display the name of the program.
41)Write a python program takes in a number and find the sum of digits in a
number.
42)Write a program function that accepts a string and calculate the number of
uppercase letters and lower case letters.
43)Write a program function that accepts a string and calculate the number of
uppercase letters and lower case letters
46) Write a Python program to create user defined exception that will check
whether the password is correct or not.
47) Write a Python program to check for zero division errors exception.
48)Design a class student with data members; Name, Roll No., Address. Create
suitable method for reading and printing students detail