0% found this document useful (0 votes)
4 views1 page

PYTHON Q Bnak For PUT

Python questions bank and practicals
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

PYTHON Q Bnak For PUT

Python questions bank and practicals
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Unit 1

1.Discuss different Python Core Data Types with examples.


2.Explain the internal working of Python. How does Python execute a program?
3.What are tokens in Python? Explain different types of tokens with suitable examples.
4.Explain the use of input (), print () and eval () functions in Python with examples

Unit 2
1.Explain different decision-making statements in Python with suitable examples
2.Explain loop control statements in Python. How are while and for loops used? Explain with examples including
the use of break and continue
3.Explain different arithmetic operators in Python with examples. Also discuss operator precedence and associativity
4.What are bitwise operators in Python? Explain with examples

Unit 3
1.What is list slicing in Python? Explain with three different examples of list slicing operations. Also, mention two
advantages of using slicing
2.Explain local and global scope of a variable with a proper example. What is the role of the global keyword in
Python?
3.What is recursion in Python? Explain its advantages and disadvantages. Write a recursive function to compute the
Fibonacci series up to n terms.
4.Explain the syntax of a function in Python with an example. Discuss the significance the return statement in a
function with a suitable program.

Unit 4
1.Explain how to create tuples in Python. Discuss indexing, slicing, and operations on tuples with suitable examples.
2.What are variable length arguments in tuples? How can tuples be passed as arguments tofunctions? Explain with
example
3.Explain the zip () and zip (*) functions in Python. Give examples to show their use
4.What are sets in Python? Explain set creation, set membership (in, not in), and basic set operations with examples

Unit 5 short note


1.Write a note on file handling in Python.
2] Explain reading, writing, appending text, and the seek() function with examples.
3] Which mode is used to add content to the end of an existing file?
4] Explain list comprehension
5. How do you write a number to a file in Python?
6] Explain the lambda function in python.
7] What does the seek(0) function do in file handling?
8] Which Python method is used to write text into a file?

You might also like