Python Foundation

+91-7982108418            
                   PYTHON FUNCTION - MODULES IMPORTANT QUESTION

 

1.Write a Python function to find the Max of three numbers.

2. Write a Python function to sum all the numbers in a list.

3. Write a Python function to multiply all the numbers in a list.

4. Write a Python program to reverse a string.

5. Write a Python function to calculate the factorial of a number (a non-negative integer). The function accepts the                   number as an argument.

6. Write a Python function to check whether a number is in a given range.

7. Write a Python function that accepts a string and calculate the number of upper letters and lower case letters.

8. Write a Python function that takes a list and returns a new list with unique elements of the first list.

9. Write a Python function that takes a number as a parameter and check the number is prime or not.

10. Write a Python program to print the even numbers from a given list.

11. Write a Python function to check whether a number is perfect or not.

12. Write a Python function that checks whether a passed string is palindrome or not.

13. Write a Python function that prints out the first n rows of Pascal’s triangle.

14. Write a Python function to check whether a string is a pangram or not.

15. Write a Python program that accepts a hyphen-separated sequence of words as input and prints the words in a                      hyphen-separated sequence after sorting them alphabetically.

16. Write a Python function to create and print a list where the values are square of numbers between 1 and 30 (both included).

17. Write a Python program to make a chain of function decorators (bold, italic, underline etc.) in Python.

18. Write a Python program to execute a string containing Python code.

19. Write a Python program to access a function inside a function.

20. Write a Python program to detect the number of local variables declared in a function.
                                             

                                            Lambda Function
1. Write a Python program to create a lambda function that adds 15 to a given number passed in as an argument, also                create a lambda function that multiplies argument x with argument y and print the result.

2. Write a Python program to create a function that takes one argument, and that argument will be multiplied with an unknown given number.

3. Write a Python program to sort a list of tuples using Lambda.

4. Write a Python program to sort a list of dictionaries using Lambda.

5. Write a Python program to filter a list of integers using Lambda

6. Write a Python program to square and cube every number in a given list of integers using Lambda.

7. Write a Python program to find if a given string starts with a given character using Lambda.

8. Write a Python program to extract year, month, date and time using Lambda.

9. Write a Python program to check whether a given string is number or not using Lambda.

10. Write a Python program to create Fibonacci series upto n using Lambda.

11. Write a Python program to find intersection of two given arrays using Lambda.

12. Write a Python program to rearrange positive and negative numbers in a given array using Lambda.

13. Write a Python program to count the even, odd numbers in a given array of integers using Lambda.

14. Write a Python program to filter a given list whether the values in the list are having length of 6 using Lambda.

15. Write a Python program to add two given lists using map and lambda.

16. Write a Python program to find the second lowest grade of any student(s) from the given names and grades of each             student using lists and lambda. Input number of students, names and grades of each student.

17. Write a Python program to find numbers divisible by nineteen or thirteen from a list of numbers using Lambda.

18. Write a Python program to find palindromes in a given list of strings using Lambda.

19. Write a Python program to find all anagrams of a string in a given list of strings using lambda

Powered by BetterDocs

Contact Us
close slider