PYTHON Q Bnak For PUT
PYTHON Q Bnak For PUT
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