Question Bank Format B.tech (CSe)
Question Bank Format B.tech (CSe)
Course : B.Tech
Branch : CSE/IT
Year / Sem : 2nd Year / 4th Sem
Subject : Python Programming (KNC-402)
Unit 1
Q4. Discuss ADT in Python. How to define ADT in Python? Write code for a student
Information.
def cube(x):
return x * x * x
x = cube(3)
print x
Unit 2
Q.1 Explain the Purpose and Working of the Loops. Discuss Break and Continue with Example.
Write a Program to convert time from 12 hour to 24 hour format.
Q.2 Write a Python program to construct the following pattern, using a nested for loop.
*
**
***
****
*****
****
***
**
*
Q.1 Write a Python program to change a given string to a new string where the first and last chars
have been exchanged.
Q3. Write a Recursive function in python Binary Search (Arr,l,R,X) to search the given element
X to be searched from the List Arr having R elements, where l represent slower bound and R
represents the upper bound.
Q4. Explain higher Order functions with respect to the lambda expression. Write a python code to
Count Occurrences of an element in the list
Q5 Explain Unpacking sequences, Mutable Sequences, and List Comprehension with example.
Write a program to sort list a dictionaries by values in python-Using lambda function.
UNIT 4
Q1. Explain the terms Merge List and Merge Sort in Python Programming.
Q2. Solve the Tower of Hanoi problem for n= 3 disk and show all the steps.
Q3. Explain different type of sorting with example. Write a program for sieve of
Eratosthenes
Q4. Write a program to perform linear search and Binary search.
Programming?