MC4112 Set4
MC4112 Set4
First Semester
1. (i) Write a Python program to compute the square root of a given number.
(ii) Write a Python program to check the given number is palindrome or not.
2. (i) Write a Python program to read and print values of variables of different data types.
(ii) Write a Python program to find the sum of squares of even numbers.
3. (i) Write a python program to calculate area of a triangle using Heron’s formula.
Page 1 of 4
(ii) Write a python program to calculate the distance between two points using function.
5. (i) Write a python program to print the factorial of a number using for loop.
6. (i) write a python program to determine whether the character entered is vowel or not.
(ii) write a python program to test whether a number entered by the user is positive, negative or
equal to zero.
8. (i) Write a python program to demonstrate the slice operations used to access the element of
the list.
9. (i) write a python program to display the highest and lowest value in the tuple.
(ii) Write a python program to copy the content from one file to another.
10. (i) Write a Python program to compute the absolute value of a given number.
(ii) Write a Python program to check the given number is Armstrong or not.
11. (i) Write a python program to interchange two values using tuple assignment.
(ii) write a python program to read n names and sort names in alphabetic order.
(ii) Write a Python program to find the most frequent words in a text read from a file.
Page 2 of 4
13. (i) Write a python program to find the GCD of two numbers.
14. (i) Write a Python program to find whether a given year is leap year or not.
15. (i) Write a Python program to print the numbers from 50 to 1 using while loop.
(ii) Write a Python program to convert a binary number into decimal number.
17. (i) Write a python program to calculate the area of a triangle using function.
(ii) write a python program to validate the mark range using exception handling.
(Range between 1-100).
18. (i) Write a NumPy program to test whether any of the elements of a given array is non-zero
(ii) Write a Python program to find the most frequent words in a text read from a file
20. (i) Write a python program to count the number consonants in the string.
(ii) Implementing programs using written modules and Python Standard Libraries
Page 3 of 4
(pandas, numpy.)
Page 4 of 4