Python Programming laboratory programs – 21CSL46

In this post, you will find Python Programming laboratory all programs – 21CSL46

Python Programming laboratory programs – 21CSL46

Program 1

1.A] Write a python program to find the best of two test average marks out of three test’s marks accepted from the user.

1.B] Develop a Python program to check whether a given number is palindrome or not and also count the number of occurrences of each digit in the input number

Program2

2.A] Defined as a function F as Fn = Fn-1 + Fn-2. Write a Python program which accepts a value for N (where N >0) as input and pass this value to the function. Display suitable error message if the condition for input value is not followed

2.B] Develop a python program to convert binary to decimal, octal to hexadecimal using functions.

Program 3

3.A] Write a Python program that accepts a sentence and find the number of words, digits, uppercase letters and lowercase letters

3.B] Write a Python program to find the string similarity between two given strings

Program 4

4.A] Write a python program to implement insertion sort and merge sort using lists.

4.B] Write a program to convert roman numbers into integer values using dictionaries.

Program 5

5.A] Write a function called isphonenumber () to recognize a pattern 415-555-4242 without using regular expression and also write the code to recognize the same pattern using regular expression

5.B] Develop a python program that could search the text in a file for phone numbers (+919876543210) and email addresses ([email protected])

Program 6

6.A] Write a python program to accept a file name from the user and perform the following
operations

  1. Display the first N line of the file
  2. Find the frequency of occurrence of the word accepted from the user in the file

6.B] Develop a program to backing up a given Folder (Folder in a current working directory)
into a ZIP File by using relevant modules and suitable methods.

Program 7

7.A] By using the concept of inheritance write a python program to find the area of triangle,
circle and rectangle.

7.B] Write a python program by creating a class called Employee to store the details of Name,
Employee_ID, Department and Salary, and implement a method to update salary of
employees belonging to a given department.

Program 8

8. Write a python program to find the whether the given input is palindrome or not (for both string and integer) using the concept of polymorphism and inheritance.

Program 9

9.A] Write a python program to download the all XKCD comics.

9B] Demonstrate python program to read the data from the spreadsheet and write the data in to the spreadsheet.

Program 10

10.A] Write a python program to combine select pages from many PDFs.

10.B] Write a python program to fetch current weather data from the JSON file

Leave a Reply

Your email address will not be published. Required fields are marked *