0% found this document useful (0 votes)
5 views2 pages

Python QuestionBank

The document outlines a comprehensive curriculum for a Python programming course, divided into five units covering various topics such as interactive and script modes, functions, data types, file handling, and SQL database connectivity. Each unit includes specific questions and programming tasks aimed at reinforcing the concepts learned. Additionally, Part B emphasizes practical applications and examples related to the topics discussed in Part A.

Uploaded by

dakshina703
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Python QuestionBank

The document outlines a comprehensive curriculum for a Python programming course, divided into five units covering various topics such as interactive and script modes, functions, data types, file handling, and SQL database connectivity. Each unit includes specific questions and programming tasks aimed at reinforcing the concepts learned. Additionally, Part B emphasizes practical applications and examples related to the topics discussed in Part A.

Uploaded by

dakshina703
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Part-A

Unit – I
1. Differentiate Interactive mode and Script mode.
2. Define keywords and give any 5 keywords.
3. Categorize different data types in python.
4. List the features of python.
5. Write a python program to exchange two values without using temporary variable.
6. Define comments with example.
7. Write a python program to check whether the given number is odd or even.
8. State the rules for naming variables.
9. Discuss the precedence of operator in python.
10. Explain the importance of indentation.

Unit – II
1. Explain the need for functions in python.
2. What is the difference between built-in and user-defined functions?
3. Give the syntax of function definition.
4. What do you meant by fruitful functions? Illustrate with an example.
5. Differentiate local scope and global scope.
6. Define function composition.
7. Define recursion.
8. Name any five string functions.
9. Strings are immutable. Justify your answer.
10. Explain string slicing with example.

Unit – III
1. Define a list. Give an example.
2. Describe list slicing. Give syntax.
3. Differentiate between lists and tuples.
4. Define list aliasing with example.
5. Mention all the basic list operations.
6. Define list cloning with example.
7. Describe the purpose of ‘+’ and ‘*’ operators on a list.
8. Define tuple with an appropriate example.
9. Explain about dictionaries.
10. Differentiate tuples and dictionaries.

Unit – IV
1. Differentiate between text file and binary file.
2. List the file modes in python.
3. What is the purpose of format operator in python?
4. Define error. List the types of errors.
5. List any four built-in modules in python.
6. What do you meant by exception handling?
7. List any 4 built-in exceptions in python.
8. Discuss about command-line arguments with an example.
9. List the purpose of any 2 built-in functions in random module.
10. List the purpose of any 2 built-in functions in math module.
Unit – V
1. What is the purpose of counters in python?
2. Describe how to create a table using SQL Database.
3. Why do we need Collections module in Python?
4. Define defaultdict with an example.
5. Write a Python program to insert a record into a SQL table.
6. Illustrate the use of decorators in python.
7. Compare OrderedDict and normal dictionary in Python.
8. Outline the various operations performed on ChainMap in Python.
9. Explain the reduce() function with a suitable example.
10. What is deque? Mention its key operations.

Part – B
Unit – I
1. Operators and its types.
2. Conditional statements
3. Looping statements.
4. Loop Control statements.
Unit – II
1. Towers of Hanoi – rules, problem, example solution, recursive function.
2. Write a python program to find the factorial of a number using functions.
3. String slicing, string aliasing, string functions and methods.
4. Write a python program to check whether a given string is palindrome or not.

Unit – III
1. List – creation, insert and update the elements in a list.
2. List comprehension.
3. Set operations – union, intersection, difference, symmetric difference.
4. Dictionary – create and access the elements of a dictionary, its operations and methods.

Unit – IV
1. Exception handling concepts using try, except, raise and finally statements.
2. File Handling – Opening a file, file modes, Closing a file, Reading and Writing files.

Unit – V
1. Python SQL Database Connectivity steps , DML operations with syntax.
2. Lambda function – filter(), map(), reduce()
3. Frozen Set – Creating, Accessing elements and operations.

For All Part – B Questions


1. Study Concepts/ Explanation about the given topic.
2. Syntax
3. Example - Program Mandatory.

You might also like