Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Python Programmin MR24 QB-1

The document is a question bank for a Python Programming course, covering various topics across five units. It includes questions on programming languages, data types, control structures, functions, object-oriented programming, and exception handling in Python. Each unit contains multiple questions designed to test understanding and application of Python concepts.

Uploaded by

paramkusam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Python Programmin MR24 QB-1

The document is a question bank for a Python Programming course, covering various topics across five units. It includes questions on programming languages, data types, control structures, functions, object-oriented programming, and exception handling in Python. Each unit contains multiple questions designed to test understanding and application of Python concepts.

Uploaded by

paramkusam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

School of Engineering

I Year B. Tech – I Semester


Subject Name: Python Programming
Subject Code: MR24-1CS0101
QUESTION BANK

UNIT - 1

1. Define Programming Language. Explain different types of programming


languages.
2. Define language translator. Explain different types of language
translators.
3. Differentiate compiler and interpreter.
4. A. With an example explain Problem Analysis Chart (PAC)?
B. Define an algorithm. Design algorithm that finds sum of n natural
numbers.
5. A. Define Flowchart. Explain different symbols used in flowchart.
B. Design algorithm and flowchart that finds Area and Circumference of
a circle.
6. List and explain features of Python.
7. A. Define the roll of PVM.
B. With neat sketch explain steps involved in PVM.
8. A. Define a variable. With example explain the rules to define variables.
B. Explain variable declaration & assignment and chained assignment
with example.
9. Explain about comments and doc strings in Python.
10. A. Explain about multiple assignment of variables in Python.
B. Define keyword. List different keywords in Python.

UNIT 2

1. List and explain different data types in Python.


2. Explain arithmetic, relational and logical operators in Python with
example.
3. A. Explain bitwise operators with example.
B. Explain identity and membership operators in Python.
4. A. Explain about if-else statement.
B. Write a Python program that finds largest number among 2 numbers.
5. A. Explain syntax of else-if ladder statement.
B. Write a Python program that finds largest number among three
numbers.
6. A. Explain while statement syntax in Python.
B. Write a Python program that prints factors of given number.
7. A. Explain for statement syntax in Python.
B. Write a Python program that finds whether the given number is
prime number or not.
8. With an example, explain about
A. break statement
B. continue statement
9. A. Explain about assertions with example.
B. Explain about zip () function with example.
10. A. Write a Python program that swaps 2 numbers using temporary
variable and without using temporary variable.
B. Write a Python to check whether the given year is leap year or not.

UNIT 3

1. Explain creating, indexing and slicing of string with example.


2. With example, explain the following string methods:
A. replace () B. upper ()
C. isnumeric () D. find ()
3. With example, explain the following string methods:
A. lower () B. join ()
C. isalpha () D. partition ()
4. Explain creating, indexing and slicing of list with example.
5. With example, explain the following list methods:
A. insert () B. clear ()
C. pop () D. sort ()
6. Explain creating, indexing and slicing of tuple with example.
7. A. Define Tuple and list the properties of Tuple.
B. With example, explain count () and index () methods with tuple.
8. A. Define set and list the properties of set.
B. With example, explain add (), remove (), discard () methods with set.
9. With example, explain the following set methods:
A. union () B. intersection ()
C. difference () D. isdisjoint ()
10. Differentiate between list and tuple.

UNIT 4
1. A. Define Dictionary. Explain about creating dictionary and accessing
elements of dictionary in Python.
B. With example, explain about adding, removing and updating of
dictionary items in Python.
2. With example, explain the following dictionary methods:
A. keys () B. values ()
C. copy () D. fromkeys ()
3. With example, explain the following dictionary methods:
A. get () B. popitem ()
C. setdefault () D. update ()
4. A. Define a function. Explain creating and calling a function with
example in Python.
B. Write a Python program to find sum of n natural numbers using user-
defined functions.
5. Explain about default and keyword arguments in Python with example.
6. Explain about positional, variable length and variable keyword length
arguments in Python with example.
7. A. How a function is passed as argument to the other function. Explain
with example.
B. Write short note on return keyword and give example.
8. Define recursion and write a Python program to find factorial of
a given number using recursion.
9. Write a Python program to display Fibonacci series up to given
range using functions:
A) Without using recursion B) Using Recursion
10.With an example explain lamda with filter (), map () and
reduce() functions.
UNIT 5
1. A. Explain about creating class, object and accessing of class
members with example.
2. Explain about method and __init__ () method with example.
3. What is inheritance? Explain different types if inheritance with
example.
4. Explain about abstraction and encapsulation with an example.
5. What is error? Explain different types of errors occurred in
programming.
6. With example, explain exception handling in Python.
7. Write a Python program illustrating:
A. Handling multiple exceptions at a time
B. Handling multiple exceptions one after another.
8. Write a Python program illustrating:
A. Handling unknown exception
B. Demonstrate finally and else block.
9. A. Define file and explain different types of files in Python.
B. Write a Python program to create a new file and add the
given text in to the file.
10. A. Explain in detail about seek () and tell () methods.
B. Write a Python program to add the contents into an existing
file and display the contents of a file from the specified position.

You might also like