The document outlines important and assignment questions related to Python programming for BCA Semester 3. It covers various topics including Python features, data types, functions, modules, and file handling, as well as practical programming tasks. Additionally, it includes explanations of concepts like dictionaries, tuples, and operator precedence.
The document outlines important and assignment questions related to Python programming for BCA Semester 3. It covers various topics including Python features, data types, functions, modules, and file handling, as well as practical programming tasks. Additionally, it includes explanations of concepts like dictionaries, tuples, and operator precedence.
1. “Python is an interpreted language”. Justify. 2. What are the key features of Python? 3. What is the role of indentation in Python? Explain with an example. 4. How do you write comments in Python? 5. List few applications of Python. 6. What is the difference between intermediate mode and script mode? 7. What are the rules for naming a variable? 8. What are keywords? 9. What are the rules for writing an identifier? 10. List the standard data types in Python. 11. What are mutable and immutable data types? Give examples. 12. What are Python strings? 13. Mention the features of list in Python. 14. What is tuple? Mention the difference between list and tuple. 15. How is tuple comparison done in Python? 16. What is multiline statement? 17. What is a function? Mention the types of function. 18. Mention the types of arguments in Python? 19. What do you mean by a module in Python? 20. What is the use of dir() function? 21. Give the Characteristics of membership operator. 22. What is the use of self in Python? 23. What is lambda function, and how does it work? 24. How do you define an empty class in Python? 25. What is indexing and negative indexing in Tuple? 26. What is the output of >> print tuple[2:4], if tuple (1234, „John‟, „Professor‟,‟CS‟,50000) 27. What is a dictionary in Python? 28. How is dictionary created in Python? 29. What do you mean by key-value pairs in dictionary? 30. Give the features of Python dictionaries. 31. How does del operation work on dictionaries? 32. How can you generate random numbers in Python? 33. What are docstrings in python? 34. What are the advantages of NumPy arrays? 35. What is slicing in Python? 36. How do you open a new file in Python? 37. How does write () method works on a file? 38. Which method is used to read the contents of a file? 39. What is pickling? 40. How to combine dataframes in pandas? Part – B 1. Explain the features of Python Programming. 2. Explain the data types in Python. 3. Write a short note on Python IDLE. 4. Write a Python program to add three numbers provide by the user. 5. Explain operator precedence and associativity. 6. Explain Python conditional statements. 7. Explain Python Looping statements. 8. Illustrate interpreter and interactive mode in python with an example. 9. What is the difference between lists, tuples and dictionaries? 10. Explain the types of import statements in Python. 11. What are the basic lists of operations performed in Python? Explain each with suitable examples. 12. Explain default parameter, keyword argument , and lambda expression with suitable examples. 13. Explain the various string operators: +, *, in, not in, range, slice[n : m] 14. Explain any five strings built in functions in Python. 15. Differentiate list and tuples in Python. 16. Explain various ways of adding values to a Python array. 17. Explain various ways of deleting values from a Python array. 18. Explain Python dictionaries in detail discussing its operations and methods. 19. Briefly explain break, continue and pass statements. 20. Write a Python program to find the sum of n natural numbers. 21. Write a Python program to find the factorial of a given number. 22. Write a Python program to check whether a given year is leap or not. 23. Explain pickle module in Python. 24. Discuss anonymous function. 25. Explain Random module and its function. 26. Illustrate the use of range() in Python with an example. 27. Write a Python program to take a string from user and count number of vowels. 28. Explain multiple inheritance in Python. 29. Explain polymorphism in Python. 30. Convert a dictionary into JSON format.