PYTHON PROGRAMMING INTERNAL and EXTERNAL
PYTHON PROGRAMMING LAB 23CSS1
1(a) Write a python
program to find Gross salary of a employee read basic pay of employee & DA
is given as DA=70% of Basic , HRA=10% of Basic ,Gross salary=Basic +DA+HRA?
(b) Write a python
program to implement bubble sort using functions?
c) Write a python
program to remove duplicates from a list using sets?
===========
============ =================== ================= ===== ===========
2(a) Write a python program to print the following patterns?
(b) Write a python program to remove
duplicate elements from a list.
(c ) Write a python program to sort a tuple
of tuples by 2nd item.
=========
=============== ==================== ============= ============= =======
3(a) Write a python
program to verify whether a given character vowel or not?
(b) Write a python program to
implement binary search by using function and the numbers are not sorted. Use a
sorting algorithm to sort the numbers and pass the numbers as a parameters to
binary search function?
(c ) Write a python program to
write string as a record to file?
================ ============= ============ ===============
============== =====
4(a) Write a python
script to print the below pattern
(b) Write a python program to find all
occurrences of a substring.
(c ) i) Write a python program for creating a
nested dictionary?
ii) Write a python program to create a
dictionary with squares of numbers?
============
================= =============== ============== =================
5(a) Write a python program to print multiplication tables of n?
(b) i)
Write a python program for counting size of files in bytes & no.of lines?
ii) Write a python program to write
data to file using writelines()?
(c ) Write
a python script to perform Union, Intersection, difference and symmetric
difference.
===========
============ ============= =============== ============== ==========
6(a) Write a python
script for following pattern
(b) Write
a python script to count all letters, digits and special symbols.
(c ) Write a python program to print GCD of a
given number using recurssion?
==============
=============== =============== =========== ============
7(a) Write a
Python function that prints out the first n rows of Pascal's triangle.
(b) Write a python program to unzip a list of
tuples into individual lists.
(c ) Write a Python program to read a random line from a file.
==============
================= ============ ============ ===============
8(a) (i) Write a
python program to find distance travelled s=u*t+0.5*a*t*t?
(ii) Write a python program to find
simple interest?
(b)
Write a python program to find out empty strings from a list of strings.
(c ) Write a python script to count the number of
strings in a list where the string length is 2 or more.
==========
===================== ================================= ========== =======
9 (a) Write a python
script to print below pattern
(b) Write a python program to find mean, median and
mode.
(c ) Write a Python program to create and display all combinations of
letters, selecting each letter from a different key in a dictionary. Sample data : {'1':['a','b'],
'2':['c','d']}
Expected Output: ac ad
bc bd
====== ============= ============= =============== ============== =========
10(a) (i) Write a python program to find sum of n natural numbers?
(ii) Write a python program to print
nth Fibonacci term?
(b) Write a Python program to
get a list, sorted in increasing order by the last element in each tuple from a
given list of non-empty tuples.
Sample List : [(2, 5), (1, 2), (4, 4), (2, 3), (2, 1)]
Expected Result : [(2, 1), (1, 2), (2, 3), (4, 4), (2, 5)]
(c ) Write a Python program to combine each line from first file
with the corresponding line in second file.?
Comments
Post a Comment