.. _example: Examples ============= 1. Palindrome --------------------------------------- i) Check whether given string is Palindrome or not .. literalinclude:: palindrome.py :emphasize-lines: 7 2. Even-Odd --------------------------------------- i) Check Given Number is Even or Odd .. literalinclude:: even_odd.py :emphasize-lines: 7 3. Factorials --------------------------------------- i) Calculate Factorial of a Given Number .. literalinclude:: factorial.py :emphasize-lines: 19 4. Prime Numbers --------------------------------------- i) Check Number is Prime or Not .. literalinclude:: prime_check.py :emphasize-lines: 13,14 ii) Generate Prime Numbers between 1 to 100 .. literalinclude:: prime_gen.py 5. Fibonacci Sequence --------------------------------------- i) Print Fibonacci sequence for a given range .. literalinclude:: fibonacci.py 6. Armstrong Number --------------------------------------- i) Check Give number is Armstrong Number or not .. literalinclude:: armstrong.py 7. Transpose a Matrix --------------------------------------- i) Python Program to Transpose a Matrix .. literalinclude:: transpose.py Interview Questions =================== Descriptive ----------- 1. Why is Python Preferred over JAVA or C++? 2. What is the difference between module and package in python? 3. How can I run a function over a list of items? 4. How to find address of a variable? 5. What is list comprehension and dictionary comprehension? 6. How to avoid redundancy of items in a list? 7. What is the difference between list and tuple? 8. What is a Lambda function? What is the return type of it? 9. What is a Pickle and its utility? 10. Give the difference between range and xrange? 11. Give difference between Iterators and Generator? 12. What are decorators and there utility? 13. Which is faster List and Tuple and why? 14. Python follows depth first search or breadth first search algorithm, with example? 15. What is slicing and negative Indexing? 16. What is the difference between Static Methods and Class Method? 17. Write a program for traversing binary tree in Python? 18. Write a program for checking number is Prime or not? 19. How Zip, Map, Reduce and filter is used? 20. How to connect databases with Python? MCQ ---- Comming Soon...