Function record (1)
Function record (1)
1. Write a python code to accept a number and check whether the number is a palindrome or
not. Use a function def Palin (n) which returns a number after reversing its digit.
Output
2. Write a python code to input a number and use a function def Armstrong () to receive the
number. The method will return 1 if the number is Armstrong, otherwise it will return 0.
Output
3. Write a python program to accept a string in a mixed case. Pass the string to a function
def freq(string). The function should find and display the frequency of each vowel.
Output
4. Write a program to store twenty different numbers in a list. Pass the list to a function def
Prime (MyList) and display only the numbers which are prime. The function doesn’t
return any value to the main function.
Output
5. Write a python code to accept a string from the user. Pass the string to a function def
Display (str) which displays the consonants present in the string.
Output