Python Lab syllabus
Python Lab syllabus
1. Write a python script to illustrate data types (int, char, float, string).
2. Write a python program to perform the following expressions using
operator precedence
(1) 5+3*2
(2) 2*32
(3) 232
(4) (23)2
3. Write a python program to illustrate type conversion functions
4. Write a python program to illustrate pi, sqrt, cos, sin functions of
mathmodule
2 Week – 2: PROGRAMS WITHOUT CONTROL STATEMENTS
1. Write a program to create a list of tuples with the first element as the
number and the second element as the square of the first element.
2. Write a python program that takes the list of tuples and sorts the list of
tuples in increasing order by the last element in each tuple.
3. Write a program to implement the following dictionary methods
a) keys() b) values() c)items() d) pop() e)delete()
4. Write a python program to add a key value pair to a dictionary and
update the dictionary based on the key.
5. Write a Program to do a reverse dictionary lookup in python.
9 Week – 9: PROGRAMS ON FILES