Question Bank1
Question Bank1
1. With suitable examples, explain different types of datatypes and type functions.
2. Explain the advantages of *args and **kwargs with examples.
3. Define infinite loops. Discuss the way to control infinite loops.
4. Discuss the precedence of operators used in evaluating the expression.
5. Compare the working of Interpreter and compiler.
6. Differentiate between local and global variables with suitable examples.
7. Write a python program to accept user input as arguments for the function named display( )
and print the parameter value on console.
8. How to write a user defined function in python? Explain with an example
9. Explain the built-in functions with examples in Python.
10. Discuss different forms of ‘if’ control statements with suitable examples for each.
11. Define list. Explain different list methods with examples
12. Write a program to display Multiplication table of given number ‘n’, using ‘while-else’ loop.
13. Compare list, tuples and sets
14. What is dictionary? Demonstrate with an example.
15. Explain the following terms:
i) capitalize ii) startswith iii) find() iv) split() v) strip() vi) count()
16. Demonstrate the concept of string slicing to swap the first and last character of a string.
17. What is file? Discuss various modes of opening a file in detail.
18. Write a Python program to perform linear search.
19. Write a Python program to insert an element into a sorted list.