MC4112 Set1

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

M.C.

A PRACTICAL END SEMESTER EXAMINATIONS, JANUARY 2022


First Semester

MC4112 - PYTHON PROGRAMMING LABORATORY


(Regulations 2021)

Time : 3 Hours Answer any one Question Max. Marks 100

Aim/Principle/Apparatus Tabulation/ Calculation Viva-Voce Record Total


required/Procedure Circuit/Program/ & Results
Drawing
10+10 20+30 10 10 10 100

1. (i) Write a python program to exchange the values of two variables without using third variable.

(ii) write a python program to perform Linear search.

2. (i) Write a python program to print the 50 prime numbers.

(ii) write a python program to validate the mark range using exception handling.

(range between 1-100)

3. (i) Write a python program to find the distance between two points.

(ii) write a python program to perform Merge sort.

4. (i) Write a python program to exchange the values of two variables without using third variable.

(ii) write a python program to Sort n numbers using Selection sort.

5. (i) Write a python program to copy the content from one file to another .

(ii) write a python program to sort n numbers using Insertion sort

6. (i) Write a python program to find the sum the series.1+1/x+1/x2 +1/x3+…………………+n

(ii) write a python program to display the student details using class.

7. (i) Write a Python program

i. To add new elements to the end of the list

Page 1 of 3
ii. To remove the elements from the list.

iii. To extend the list.

iv. To concatenate two list.

v. To sort the elements in the list in ascending order.

vi. To reverse elements in the list.

(ii) Write a Python program to find the factorial of given number using recursion.

8. (i) Write a Python program to check whether the given number is even or odd.

(ii) Write a program that inputs a text file. The program should print all of the unique words in

the file in alphabetical order

9. (i) Write a python program to count the number of vowels and consonants in the string.

(ii) Implementing programs using written modules and Python Standard Libraries

(pandas, numpy.

10. (i) Write a python program to find the GCD of two numbers.
(ii) Write a python program to check the given string is palindrome or not.

11. (i) Write a Python program.

i. To create a dictionary

ii. To adding an element to dictionary

iii. To display length of the dictionary.

iv. To updating element in dictionary.

v. To remove all elements from the dictionary

(ii) Write a Python program to find maximum and minimum number in a list.

12. (i) Write a python program to convert Celsius into Fahrenheit.

(ii) write a python program to count the number of lines, words, characters in a file

13. (i) Write a python program to construct the following pattern using nested for loop

Page 2 of 3
(ii) write a python program to read n names and sort names in alphabetic order.

14. (i) Write a python program to find the biggest among three numbers .

(ii) Using exception handling write a python program to check the person is eligible to

vote or not.

15. (i) Write a python program to reads a positive integer and then prints all the positive divisor

of that number.

(ii) write a python program to implement zero division error using exception handling.

16. (i) Write a python program to find the sum of digits.

(ii) write a python program to print the Fibonacci series

17. (i) Write a Python program for cloning the list.

(ii) Write a Python program to find the most frequent words in a text read from a file.

18. (i) Write a python program to circulate the values of n variables.

(ii) write a python program to perform Binary search.

19. (i) Write a python program to find the biggest among three numbers.

(ii) write a python program to sort n numbers using Quick sort

20. (i) Write a python program to find the sum of first n even numbers.

(ii) Write a python program to sort n numbers using Merge sort.

Page 3 of 3

You might also like