0% found this document useful (0 votes)
2 views3 pages

Python Exam Questions

The document contains a series of exam questions covering various aspects of Python programming, divided into five units. Topics include Python's importance, data types, operators, functions, loops, file handling, and data structures like lists, tuples, and dictionaries. Each unit consists of multiple questions aimed at assessing knowledge and understanding of Python programming concepts.

Uploaded by

shadvi176
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)
2 views3 pages

Python Exam Questions

The document contains a series of exam questions covering various aspects of Python programming, divided into five units. Topics include Python's importance, data types, operators, functions, loops, file handling, and data structures like lists, tuples, and dictionaries. Each unit consists of multiple questions aimed at assessing knowledge and understanding of Python programming concepts.

Uploaded by

shadvi176
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

Python Programming Exam Questions

Unit 1

1. Give the importance of Python and how it works internally.

2. What are tokens in Python? Give their types.

3. What are comments in Python?

4. How to assign the values to the variable in Python programming?

5. What are Python code data types?

6. What are operators in Python? Give their types.

7. Explain the Python character set.

8. Explain print() function and eval() function with examples.

9. Explain in detail about input() function.

Unit 2

1. Explain the operator precedence and associativity in Python programming.

2. Short notes on arithmetic operator, assignment operator, bitwise operator, boolean operator,

relational operators.

3. Explain assignment operator with example.

4. Explain bitwise operator with example.

5. Explain the decision-making statements in Python programming. Explain each.

6. What is range() function with example in Python programming?

7. Explain the boolean expressions with example.

8. State the difference between while loop and for loop.

9. Explain in detail about break statement and continue statement.


Unit 3

1. Short note on:

- Recursive function

- Lambda function

- Global and local scope of variable

2. What is a function? Explain with its syntax and basics.

3. State the difference between parameter and argument.

4. Explain in detail return statement.

5. How to pass a list to a function and return a list from a function?

6. How to create a list and how to access list using list slicing?

7. What is meant by list comprehension? Write a program to demonstrate list comprehension.

8. Give the functions and methods of the list.

Unit 4

1. Explain the zip() function and inverse zip function in tuple.

2. What is a tuple? How to create a tuple?

3. Give the input function for tuples.

4. How to create a dictionary and compare two dictionaries with example?

5. Explain indexing and slicing of tuple in detail.

6. Explain the membership operators i.e. set 'in' and 'not in' operators in list.

7. How to create a dictionary and how to add, replace, delete the dictionary?

8. What is a nested dictionary? How to traverse nested dictionaries?

Unit 5
1. What is meant by file handling in Python programming?

2. Explain file handling in Python.

3. How to write a number to a file and how to read a number from a file?

4. Write a Python statement to open a text file "[Link]" so that new contents can be written on

it.

5. Write in details about seek() function and tell() function.

6. Explain how to read, write and append data in file handling.

7. What is the difference between 'w' and 'a' in file handling of Python programming?

You might also like